''' Program: 1 Description: Playing with strings using "+" Author: Tanu Nanda Prabhu ''' value = 20 value2 = 19 result = int('%d%d' % (value, value2)) print(result) ''' Program: 2 Description: Playing with strings using "+" Author: Tanu Nanda Prabhu ''' value = '20' value2 = '20' result = (int(value) + int(value2)) print(result) ''' Program: 3 Description: Playing with characters Author: Tanu Nanda Prabhu ''' char = 'A' print(ord(char)) ''' Program: 4 Description: Playing with join method Author: Tanu Nanda Prabhu ''' s1 = 'abc' s2 = '123' print(s1.join(s2)) ''' Program: 5 Author: Tanu Nanda Prabhu ''' str1, str2 = "Python", "Python" print("id of str1 is: ", id(str1)) print("id of str2 is: ", id(str2)) if id(str1) == id(str2): print("True") else: print("False") ''' Program: 6 Author: Tanu Nanda Prabhu ''' val = set() print(type(val)) ''' Program: 7 Author: Tanu Nanda Prabhu ''' # Playing with Lists in Python lis = [1, 2, 3, 4, 5] lis2 = [6, 7, 8, 9, 10] print(lis+lis2) ''' Program: 8 Description: Using str.lower() method Author: Tanu Nanda Prabhu ''' str1 = "pythoN" str2 = str1.lower() print(str1 == str2) ''' Program: 9 Description: Typecasting the variable Author: Tanu Nanda Prabhu ''' val = "Python" result = ''.join(list(val)) print(result, type(result)) ''' Program: 10 Description: List index method Author: Tanu Nanda Prabhu ''' lis = ['Python', 'Programming', 'Rocks'] pos = lis.index("Rocks") print(pos * 3)