Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SamBot
#2
I would say you need to start formatting your strings as in
print("I love", userMovie, "and", random.choice(movieList), "is really good too")
You can just write
print(f"I love {userMovie}, and {random.choice(movieList)} is really good too")
What i did there is i put the "f" formatting before the string to enable me to call variables inside "{}" brackets, It's pretty simple stuff and saves allot of time plus looks better, Go here for a better explanation.
And the best practice is to put all of your imports at the top of the file instead.
Reply


Messages In This Thread
SamBot - by Zirizo - May-12-2020, 12:22 PM
RE: SamBot - by Anarab - May-21-2020, 04:08 PM
RE: SamBot - by pyzyx3qwerty - May-22-2020, 10:41 AM

Forum Jump:

User Panel Messages

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