Python學習第六天

#!/usr/bin/pythonpython

# -*- coding:UTF-8 -*-app

# filename:test6.pytest


var1 = 'hello world'date

var2 = 'Python Programming'coding

print ('var1[0]:',var1[0])file

print ('var2[1:5]:',var2[1:5])di


print ('Updated String :-',var1[:6]+'python')co

print ('My name is %s and weight is %d kg!' %("zara",21))


var3 = '''

hello world 

I am very happy <HTML>HAHA</HTML>

'''

print (var3)


print (u'hello world !')

print (u'hello\u0020world!')

相關文章
相關標籤/搜索