Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clarification
#2
input() is a function that gets text input from the user. str() is a function that converts values to the 'String' type, just like int() converts values to integers.

If you used name = str("What is your name: ")name would be set to the sting "What is your name: ".
Reply


Messages In This Thread
Clarification - by Hammuel - Oct-29-2017, 10:37 PM
RE: Clarification - by Lux - Oct-29-2017, 11:40 PM
RE: Clarification - by Hammuel - Oct-30-2017, 12:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Can I get some clarification on importing functions from external files. wh33t 3 918 Feb-25-2023, 08:07 PM
Last Post: deanhystad
  Looking for clarification related to performance Pymon 5 2,058 Apr-04-2022, 04:47 PM
Last Post: deanhystad
  Read Tensorflow Documentation - Clarification IoannisDem 0 1,174 Aug-20-2021, 10:36 AM
Last Post: IoannisDem
  *args implementation and clarification about tuple status amjass12 10 4,077 Jul-07-2021, 10:29 AM
Last Post: amjass12
  Just need some clarification Tonje 3 2,074 Oct-01-2020, 03:52 PM
Last Post: deanhystad
  Global Variables - Some Points Needing Clarification. adt 4 2,973 Nov-30-2019, 01:23 PM
Last Post: adt

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020