Python Forum
Help with test exercise
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with test exercise
#1
Hey Im having a test and I cant get over one exercise.

Python - Write a program that shows words that contains "-" symbol in a text written by user. Test it for "czarno-biale"
Reply
#2
what have you tried? Post your code in code tags and ask specific questions. If you get error, post full traceback in error tags.
we are glad to help, but we are not here to do your [home]work for you.
Reply
#3
Okay I did it myself, thread can be closed. Sorry for problems.
Reply
#4
That's easy! :)
>>> def contains_dash(words):
...   for word in words:
...     print(word)
...
>>> contains_dash('czarno-biale'.split())
czarno-biale
Reply


Forum Jump:

User Panel Messages

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