0
Python " relay race" test in beginner course isn't working for me.
https://sololearn.com/compiler-playground/cFzwc7Md10cU/?ref=app
8 ответов
+ 3
you can change the value of sep to an empty string, e.g.:
print("Group 1:\n",g1, sep="")
Or you print g1 in an extra print() on the next line.
+ 5
print() has a separate sep=" ". Look at the expected output: There is no blank space in front of the name lists
+ 3
or use f-string, so you won't invoke the sep.
print(f"Group 1:\n{g1}")
+ 2
Hi Abdur Rahman ,
If you’re trying to create three lists using slicing, your code appears to achieve that. What specific issue are you experiencing?
+ 2
They simply want separate groups of two and separate print lines of the groups ...
Create the slices as
g1 = players[0:2], g2= , g3=
Then below each print(Groups) they want a separate print of groups as g1, g2, g3
print("Group 1:")
#display the 1st group
print(g1)
+ 2
# Hi Abdur Rahman,
# Here’s an example based on your code idea,
# with a few adjustments to make it more efficient:
# https://sololearn.com/compiler-playground/c08M8RnDTW06/?ref=app
+ 1
Tnx Lisa
so how do I solve it?
+ 1
Lisa how to be a mentor