day-001--初识python
初识python 1.环境准备:pc一个,我用的window10,python用的3.7最新的,ide用的 pycharm,markdown编辑器用的Typora 2.其他系统的环境可以自己百度安装 3.见面国际惯例hello word
importsys
print (sys.version)
print(sys.version_info)
print("Hello","www")
print("Hello","hello","world",sep=',',end='!');
print('Hello','world',end='!\n!')
print("I am %d years young" % 26)
my_year = 26
print("I am %d years young" % my_year)
my_name = 'jinxxx'
print("I am %s " % my_name)
my_name_str = 'jin' + 'xxx'
print("My name is %s " % my_name)
str_num = str(my_year)
test_str = 'I am ' + str_num + 'years young'
print(test_str)
输出结果:
3.7.4 (tags/v3.7.4:e09359112e, Jul8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)]
sys.version_info(major=3, minor=7, micro=4, releaselevel='final', serial=0)
Hello www
Hello,hello,world!Hello world!
!I am 26 years young
I am 26 years young
I am jinxxx
My name is jinxxx
I am 26 years young
包含直接输出,格式化输出,字符串拼接,int2str
更多请看https://www.cnblogs.com/QI1125/p/7640833.html
文集传送门 学习python100天整个学习python100天的目录传送门无敌分割线 【day-001--初识python】再最后面附上大神的链接传送门
推荐阅读
- python学习之|python学习之 实现QQ自动发送消息
- 逻辑回归的理解与python示例
- python自定义封装带颜色的logging模块
- 【Leetcode/Python】001-Two|【Leetcode/Python】001-Two Sum
- Python基础|Python基础 - 练习1
- Python爬虫|Python爬虫 --- 1.4 正则表达式(re库)
- Python(pathlib模块)
- python青少年编程比赛_第十一届蓝桥杯大赛青少年创意编程组比赛细则
- Python数据分析(一)(Matplotlib使用)
- Python|Python 9.20