Python Forum
[Guidance needed] Python def question
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Guidance needed] Python def question
#1
Complete the program (i.e. implement the function concat_words ) so that it will print the
output as shown:
[1-apple*2-orange*3-pear*]

Answer:




all_words = concat_words(['apple', 'orange', 'pear'])
print ('[' + all_words + ']')
Reply


Messages In This Thread
[Guidance needed] Python def question - by PieTurn - Aug-04-2019, 03:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation Python Homework (Urgent help needed!!) chickenseizuresalad 6 4,590 Oct-11-2021, 01:59 AM
Last Post: Underscore

Forum Jump:

User Panel Messages

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