0

How to change string to integer in for loop

I want to change my string input into int in for loop . So how to do that ?

6th Jul 2020, 11:48 AM
harshit
3 Réponses
+ 6
Before we can help you, you should have done a try by yourself first. Please put your code in playground and lik it here. Thanks!
6th Jul 2020, 11:55 AM
Lothar
Lothar - avatar
+ 2
num = int(input('Enter a number > ')) print(num + 5)
6th Jul 2020, 11:50 AM
Slick
Slick - avatar