forked from hariom20singh/python-learning-codes
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path8.py
More file actions
Latest commit
13 lines (12 loc) · 279 Bytes
/
Copy path8.py
File metadata and controls
13 lines (12 loc) · 279 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
# Python code
# To reverse words in a given string
# input string
string="quiz practice code"
# reversing words in a given string
s=string.split()[::-1]
l= []
foriins:
# apending reversed words to l
l.append(i)
# printing reverse words
print(" ".join(l))