Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>> 3+4 7 >>> str1="Today is" >>> str2="Friday" >>> str1+str2 'Today isFriday' >>> str1 'Today is' >>> str2 'Friday' >>> str3="whell" >>> str4="eat" >>> str3+str4 'whelleat' >>> str1 'Today is' >>> str2 'Friday' >>> str1+" "+str2 'Today is Friday' >>> newstring=str1+" "+str2 >>> newString Traceback (most recent call last): File "", line 1, in newString NameError: name 'newString' is not defined >>> newstring 'Today is Friday' >>> str1 'Today is' >>> str2 'Friday' >>> str1 'Today is' >>> str1*3 'Today isToday isToday is' >>> #str1*3 is the same as str1+str1+str1str1 >>> str1 'Today is' >>> len(str1) 8 >>> len(str2) 6 >>> str2 'Friday' >>> myList=[2,4,6,8] >>> len(myList) 4 >>> list2=list(range(2,20)) >>> list2 [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] >>> len(list2) 18 >>> myLIst=[2,32.17,"Friday"] >>> len(myLIst) 3 >>> myList=[2,30,[20,2,10],[4,"word"],5] >>> len(myList) 5 >>> str1="Word" >>> str1[0] 'W' >>> str1[1] 'o' >>> str1[2] 'r' >>> str1[3] 'd' >>> str1[4] Traceback (most recent call last): File "", line 1, in str1[4] IndexError: string index out of range >>> str1="the weekend is finally near! It will be great!!!" >>> len(str1) 49 >>> str1="the weekend is finally near. It will be great!" >>> len(str1) 47 >>> str1[-1] '!' >>> str2="No" >>> str2[-1] 'o' >>> str2[0] 'N' >>> str1[0] 't' >>> str3="Word" >>> str3[3] 'd' >>> str[-2] Traceback (most recent call last): File "", line 1, in str[-2] TypeError: 'type' object is not subscriptable >>> str3[-2] 'r' >>> str3[-1] 'd' >>>