Can we only enter strings using the input? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can we only enter strings using the input?

18th Sep 2016, 6:00 AM
Souvik Basumatary
Souvik Basumatary - avatar
2 Answers
0
I believe so, try it though
21st Sep 2016, 6:14 AM
isk
isk - avatar
0
In python 2.x there were two options raw_input() and input. By default everything you enter in python as an input it takes that as a string.So, from python 3.x they have kept only input() , you can typecast the input as per your need say, float(input()), int(input()).
26th Sep 2016, 8:13 PM
Susan Ghosh