自学python笔记1
学习Python第一天,推荐软件pycharm community版,
我本人是跟着侯爵的《编程小白的第一本Python入门书》学的,个人很喜欢原作者的思路和话语风格,非常生动有趣,向侯爵大大salute!
学习资料来源:(没有打广告)
一行数据公众号获取
字符串模块知识点:
(Python里单引号和双引号几乎没有差别,三个引号被用于过于长段的文字或者是说明,只要三引号不完你就可以随意换行写下文字)
1.
name=input('please enter your name:')
print('hello,',name)
name的值是你直接输入的字符。
words='words'*3
print(words)
结果:
what_he_does='plays'
his_i='guitar'
hisname='zqt'
art_intro=hisname+' '+what_he_does+' '+his_i
print(art_intro)
结果:
4.类型转换
num=1
string='1'
num1=int(string)
print(num