首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >python基础①

python基础①

作者头像
用户1359560
发布2018-08-27 11:46:41
发布2018-08-27 11:46:41
2560
举报
文章被收录于专栏:生信小驿站生信小驿站

改变工作环境

代码语言:javascript
复制
import os
os.chdir("I:\\pythonwork")
os.getcwd()
'I:\\pythonwork'

for循环

代码语言:javascript
复制
cities = ["beijing","shanghai","guangzhou"]
for city in cities:
    print(city)

if语句

代码语言:javascript
复制
animals = ["cat","mouse","rabbit"]

if "cat" in animals:
    print("yes")
else:
    print("no")
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018.01.07 ,如有侵权请联系 cloudcommunity@tencent.com 删除
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档