Why Print function need to print anything in Python always?
sumitdba10 (0)

str1 = "Hello"
str1[0] = not executing while
print(str1[0]) = H is giving result

You are viewing a single comment. View All
MichelleA8 (2)

If you really want to convert the string to and int, try (after "print(str1[3::])":
sum1 = "5"
print(sum1)
print(int(sum1) + 2)
~Remember to convert the data type of the variable because you cannot add a string to an int.