Python Tutorial 4: String Interpolation

Опубликовано: 15 Ноябрь 2011
на канале: JAA228
2,636
30

Covers how to use String Interpolation in Python which can be used to insert values into a string. String values and number values are used. This also covers how to put more than one value into a string. Demonstrated on Mac OS X.
Please comment, rate, and/or subscribe ; )
Link:
http://www.python.org/download/ - Download Python

Code used in this video:
#create a variable called name with "JAA228" stored in it
name = "JAA228"
#recall the value stored in name
name
#display "Hello (name here)!"
print "Hello %s!" % name
#create a variable called number with the value 26 saved in it
number = 26
#recall the value stored in number
number
#display "There were (number here) apples picked today."
print "There were %d apples picked today."
#display "Hello (name here)! There were (number here) apples picked today."
print "Hello %s! There were %d apples picked today."


На этой странице сайта вы можете посмотреть видео онлайн Python Tutorial 4: String Interpolation длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь JAA228 15 Ноябрь 2011, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 2,636 раз и оно понравилось 30 зрителям. Приятного просмотра!