• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
+ 1

how to make this work

https://code.sololearn.com/ci1TiYx6GsfA/?ref=app

pythonstringsformatting
12th Jan 2022, 12:02 PM
Vivian Anoemuah
Vivian Anoemuah - avatar
3 Answers
+ 6
message="Hello:{0} {1}".format(name[0], name[1])
12th Jan 2022, 12:13 PM
Alexey Kopyshev
Alexey Kopyshev - avatar
+ 1
A different way name=["Vivian"," Anoemuah"] print(f"hello:{name[0]} {name[1]}")
12th Jan 2022, 12:50 PM
Oma Falk
Oma Falk - avatar
0
Vivian Anoemuah, a simple google search can help: https://stackoverflow.com/questions/9969684/how-do-i-add-space-between-two-variables-after-a-print-in-JUMP_LINK__&&__python__&&__JUMP_LINK https://www.geeksforgeeks.org/how-to-print-spaces-in-python3/amp/ https://stackoverflow.com/questions/24947058/simple-adding-spaces-between-variables-in-python3
12th Jan 2022, 1:34 PM
NEZ
NEZ - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
Guys I don't know anything about cooding who can help me pls
1 Votes
Decorators in python.
2 Votes
Coding for Cybersecurity
1 Votes
What do you think of this code and what are your suggestions for developing and modifying it?, How can I develop myself more?
1 Votes
Need help
1 Votes
Salut tout le monde
2 Votes
Pointers in c#
1 Votes
Please click me
0 Votes
Can sololearn have multiple inpus&outputs?
3 Votes
Hello !
0 Votes