What Xiaoting is sharing with you today is Python And print A preliminary understanding of .
Python And print A preliminary understanding of
print A preliminary understanding of : For people with professional background or relevant experience , Study python It's quite interesting ,
Because you can do daily tasks , Like automatically backing up your MP3; You can make websites , Such as YouTube Namely Python Written ; Can do the backstage of network game , A lot of online game backstage is Python Developed ; You can crawl data , Get what you want . In a word, I can do a lot of things . And for me who's not a Coban , Study python It's very hard , From line to line print Code , To a keyword , Ideologically, it is a kind of reform , This process is both boring and interesting , And the first code I'll do is print('life is short,you need python'). As the saying goes , Life lies in tossing . Before you get old , Catch up with the trend of the times , Let's learn python, As a survival skill , You can cultivate your life again , Why not do it !!!
print(' Welcome to learn python3 in print Use ') # result : Welcome to learn python3 print Application print('life is short,you need python') # result :life is short,you need python print('a')# Printing of strings # result :a print(9)# Digital printing # result :9 print([1,2,3,4,5])# Printing of lists # result :[1, 2, 3, 4, 5] print((1,2,3,4,'5'))# The printing of tuples # result :(1, 2, 3, 4, '5') print({'a':1, 'b':2})# Printing dictionary # result :{'a': 1, 'b': 2} print('my name is %s,age is %d' %('lucky',66))# Format printing # result :my name is lucky,age is 66 print('%.3f'%(39.122221568))# Format output floating point printing # result :39.122 print('%10.3f' % 39.122221568872) # Field width 10, precision 3 # result : 39.122
summary : That's the main content of this article , I hope the content of this article can bring some help to your study or work ,python3 in print Printing requires brackets , Indentation is very important , Indentation represents the beginning of a block of code , A non indent represents the end of a code , Space indentation and Tab Indentation can't be mixed up , If you encounter an indent error , You can do it first Ctrl+A, Re execution Ctrl+Alt+L, The problem can be solved by indentation .
Last , Thank you for your attention .
DB Written interview history link
http://mp.weixin.qq.com/s/Vm5PqNcDcITkOr9cQg6T7w
About Me: Wheat seedling
● The author of this article : Wheat seedling , Just focus on Database Technology , Pay more attention to the application of Technology
● Author's blog address :http://blog.itpub.net/26736162/abstract/1/
● copyright , Welcome to share this article , Reprint please keep the source