Demonstrates string concatenation and repetition : Loop « String « Python






Demonstrates string concatenation and repetition

 

print "You can concatenate two " + "strings with the '+' operator."

print "this " \
      + "is " \
      + "a test!"

print \
"""
A
B""",

print "Pie" * 10

print "\nNow that's good eating."

   
  








Related examples in the same category

1.Demonstrates the for loop with a string