Addition vs. Concatenation:The first adds the two numbers, the second binds the two strings: Code: one = 1
two = 2
print(one+two)
one = "one"
two = "two"
print(one+two)
Output: Cleaning up stringsCode: a = 'aa' b = 'bb' c = 'cc' d = 'dd'
u = a, ":", b, ":", c, ":", a
uu =''.join(map(str, u))
print "raw string ", u print "cleaned up string ", uu
raw string ('aa', ':', 'bb', ':', 'cc', ':', 'aa') cleaned up string aa:bb:cc:aa
|
|