Chapter 9 Exercise 1 : Python tutorial 129

preview_player
Показать описание
Guys please help this channel to reach 20,000 subscribers. I'll keep uploading quality content for you.

Python is easy programming language to learn and anyone can learn it, and these tutorials are 100% free in hindi.

You can share this playlist with your brother, sisters and friends. This will surely add some values to their life.

If you follow this complete playlist of python tutorial surely you will learn everything about python programming language.

This is exercise 1 of chapter 9

Рекомендации по теме
Комментарии
Автор

names = ['abc', 'def', 'ghi', 'klm', 'nop']

new_name = [name[::-1] for name in names]

print(new_name)

foraces
Автор

def reverse():
names = ['abc', 'def', 'ghi', 'klm', 'nop']
new_name = [name[::-1] for name in names]
return new_name
print(reverse())

foraces
Автор

2 lines only..😎
names = ["Prince", "Suraj", "Akash", "Kuldeep"]
print([name[::-1] for name in names])

trigger
Автор

Thanks alot sir ur lectures are really useful

Ruohj
Автор

names = "abc", "bbc", "cca"

reversed_lst = [name[::-1] for name in names]
print(reversed_lst)

siddharthmalviya
Автор

def reverse2(*list1):
reverse1 = [args1[::-1] for args1 in list1]
print(reverse1)

reverse2('abc', 'xyz', 'rst')

MetallicA
Автор

Sir! here is my solution:

# with old method
def reverse_string(l):
new_list = []
for i in l:
new_list.append(i[::-1])
return new_list
names = ['water', 'fire', 'air']
print(reverse_string(names))

# with new method / list comprehension
def reverse_string_new(l):
names_2 = [i[::-1] for i in l]
return names_2

zeeshanakram
Автор

list1 = ['varun', 'agrawal', 'is', 'the','great','in', 'the world']
def reverse_list(l):
reversed_list = [item[::-1] for item in l]
return reversed_list
print(reverse_list(list1))

jaihindjaibharat
Автор

words=["abc", "xyz", "xmz"]
new=[ i[::-1] for i in words ]
print(new)

roshangupta
Автор

Solution:


def
list2 = []
[list2.append(rec[::-1]) for rec in list1 ]
return list2

list1 = input("Please Enter List Elements comma separated : ").split(", ")

list1 =
print(list1)

MrAws
Автор

def reverse(l):
k=[i[::-1] for i in l]
return k

bestofpubg
Автор

#Hello Harshit Bhai
def get_list(get_name):
new_name=[name[::-1] for name in get_name]
return new_name
names=['Aidoon', 'Zahid', 'Raju', 'David', 'Ahmed']
print(get_list(names))

learnfun
Автор

the first index of reversed list must be 'cba' and not 'bac'

vedantpareek
Автор

solution:
names = ['soyeb', 'rajib', 'salman', 'pratik']
def rev(l):
newlist = [i[::-1] for i in l]
print (newlist)
rev(names)

soyeb
Автор

Solution :

s1 = ["abc", "vut", "xyz"]

s2 = [i[::-1] for i in s1]

print (s2)

NoorMuhammad-dtkf
Автор

wow. mera code baki sab comment se chota hay. so I win😎

mahathirmohammad
Автор

name =['Aditya', 'Ashish', 'Raj', 'Rakesh']
# to make a list of the first later od every name
first_later = [n[::-1] for n in name]
print(first_later)

adityakaushal
Автор

finished in 10 sec😎😎

print([i[::-1] for i in ["abc", "def", "hij"]])

mahathirmohammad
Автор

sir what are your doing
you do upload chapter 5 complete
and now you canot upload videos of chapter 8
plz upload videos

FaizanMalik-gkrq
Автор

list1 = ['hello', 'world']
list2 = [name[::-1] for name in list1]
print(list2)

MRGolum