Skip to content

Commit 1eaab69

Browse files
author
Pc
committed
updated
1 parent 187604a commit 1eaab69

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Exercise/Exercise7.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'''
2+
Enter a String : Introduction To Python
3+
Required Output = ['y', 't', 't', 'o', 'o', 'n', 'n', 'h', 'c', 'P', ' ']
4+
'''
5+
def main():
6+
inputString= ("Enter a String : ")
7+
inputList=list(inputString)
8+
inputList. ()
9+
inputList. ()
10+
print("Required Output = ", )
11+
12+
if __name__ == '__main__':
13+
main()

Solutions/Excercise7.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'''
2+
Enter a String : Introduction To Python
3+
Required Output = ['y', 't', 't', 'o', 'o', 'n', 'n', 'h', 'c', 'P', ' ']
4+
'''
5+
def main():
6+
inputString= input("Enter a String : ")
7+
inputList=list(inputString)
8+
inputList.sort()
9+
inputList.reverse()
10+
print("Required Output = ",inputList[::2])
11+
12+
if __name__ == '__main__':
13+
main()

0 commit comments

Comments
 (0)