Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13891

I want a int input varible then cnvert it to string

$
0
0

So i wanted to convert an int(input('Enter an integer') to str. because i wanted to code that if the user inputed a letter the python would print out this ('Error'). The reason im doing this is i was wondering if im able to do it without the use of.isdigit or try.

letters = 'a-z' (just imagine all the letters)user = int(input('> ))if user >= 52:     blank += 1if user in letters:     print(errro)

Viewing all articles
Browse latest Browse all 13891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>