خرید بک لینک

Vote count: 0

I have been asked to find the position(s) of an input word from an input sentence and I am having trouble figuring out how to use enumerate, .split and lists together. This is what I have so far:

sntc=str(input("Please input a sentence with no punctuation."))
wrd=str(input("Please input a word from that sentence."))
words=sntc.split
list(enumerate(sntc))
for x in y in enumerate:
    if x==(wrd):
        print ("The chosen word is in postion(s):",x+1)

asked 38 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 25 ارديبهشت 1395 ساعت: 22:27

صفحه بندی