Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Return a definition
#4
(Jul-27-2020, 11:23 AM)jefsummers Wrote: This is only part of your code, and not sure where it is getting glossary, but I believe the following should work
return f'The definition of {user_input} is {glossary [user_input]}'
If this does not work please post all of your code, as the error may be elsewhere.

Thank you, it didn't work my end, the glossary is part of the rest of the code, i should of posted it.

This is what it came back with 'The definition of {user_input} is {glossary [user_input]}' when i ran it
Reply


Messages In This Thread
Return a definition - by samh625 - Jul-27-2020, 10:30 AM
RE: Return a definition - by jefsummers - Jul-27-2020, 11:23 AM
RE: Return a definition - by samh625 - Jul-27-2020, 01:05 PM
RE: Return a definition - by deanhystad - Jul-27-2020, 01:04 PM
RE: Return a definition - by samh625 - Jul-28-2020, 08:32 AM
RE: Return a definition - by deanhystad - Jul-27-2020, 02:44 PM
RE: Return a definition - by jefsummers - Jul-27-2020, 09:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  New to coding. An error occurs with no definition westernwhiskey 4 3,177 Mar-15-2018, 12:37 PM
Last Post: westernwhiskey
  trouble importing class definition from one .py into another ijosefson 3 3,471 Oct-16-2017, 08:24 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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