Python Forum
Remove space after random.randrange(1, 11)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove space after random.randrange(1, 11)
#4
(Jun-06-2020, 07:01 AM)rs74 Wrote: Oh, thanks for fast reply, it works great. Interesting with .format, will read and test more.
.format() is starting to get old,there is now f-string.
from random import randrange

print(f'What is {randrange(1, 11)} times {randrange(1, 11)}?')
Output:
What is 4 times 1?
Reply


Messages In This Thread
RE: Remove space after random.randrange(1, 11) - by snippsat - Jun-06-2020, 07:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] why can't i create a list of numbers (ints) with random.randrange() astral_travel 7 1,709 Oct-23-2022, 11:13 PM
Last Post: Pedroski55
  Remove a space between a string and variable in print sie 5 1,958 Jul-27-2022, 02:36 PM
Last Post: deanhystad
  from global space to local space Skaperen 4 2,425 Sep-08-2020, 04:59 PM
Last Post: Skaperen
  How to remove space between strings sunnyarora 2 2,801 May-03-2019, 11:44 AM
Last Post: perfringo
  random.randrange ravioli2929 14 7,148 Mar-17-2019, 04:49 PM
Last Post: perfringo

Forum Jump:

User Panel Messages

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