s = "string" print(s[0:2]) # st print(s[:3]) # str print(s[3:]) # ing s2 = "one" print("Write " + 2*s2 + " " + s) # Write oneone string print("hello %s, lab %d !" % ("students",1)) # hello students, lab 1 ! import string print("hello {}, lab {}".format("world",1)) # hello world, lab 1 print("hello {0}, lab {1}".format("world",1)) # incepand cu python 2.6