Chapter 5 : Exercise 6 : Python tutorial 106

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 chapter 5 exercise 6
Рекомендации по теме
Комментарии
Автор

test = [1, 2, 3, [1, 2], [1, 2, 3], []]

def list_count(li):
count = 0
for i in li:
if type(i) == list:
count +=1
return count

print(list_count(test))

NoorMuhammad-dtkf
Автор

def check(l):
counter=0
for i in l:
if type(i)==type(l):
counter+=1
print(f"Total lists inside list is : {counter}")



numbers=[1, 2, 3, [1, 2, 3], ["hello", "how", "are", "you", "???"], [3, 2, 1]]
print(f"Entered List:{numbers}")
check(numbers)

rangesh
Автор

def list_count(x):
a= 0
for i in x:
if type(i) == type(x):
a +=1
return a
x = [1, 2, 3, [1, 2], ["You"]]
print(list_count(x))

yu_a_vi
Автор

def check_number_of_list(lst):
count = 0
for item in lst:
if type(item) == list:
count += 1
print(count)


check_number_of_list([1, 2, [3, 4, 5], [12, 3]])

siddharthmalviya
Автор

x= [ [1, 2, 3, 4, 5], [2, 3, 4, 5, 6], 1, 2, 3, 4, "Subhashri"]
def common_(y):
count=0
for i in y:
if type(i)==list :
count+=1
return count

print(common_ (x))

subhashriroy
Автор

def count_list(l):
lst=[ ]
for i in l:
if type(i) == list:
lst.append(i)
return len(lst)
num=[1, 2, 3, [4, 5], 6, [7, 8], 9]
print(count_list(num))

ashishnayke
Автор

list1 = [1, 2, 3, 4, [5, 6, 7], [8, 9], [5, 6, 7], [8, 9]]
def check_lists_in_list(list1):
count = 0
for item in list1:
type_of_item = str(type(item))
if type_of_item == "<class 'list'>":
count += 1
return count


MRGolum
Автор

106 Excersie

def
count=0
for lst in given_list:
if(type(lst))==list:
count+=1
return count

mix_list=[1, 6, 5, [1, 8, 9], [8, 6, 9]]

gauravmarathe
Автор

mixed= [1, 2, [3, 4], [5, 6]]
def count_lists(x):
num=0
for i in x:
if type(i) is list:
num+=1
return num
print(f"You have {count_lists(mixed)} list(s) inside your list.")

dipankur
Автор

Def howmuchlist(l):
For sublist in l:
Return sublist

Num =[1, 2, 3, [4, 5, 6, 7], [8, 9, 10, 11, 12] ]
Print(howmuchlist(num))

Navneetkaur-yzxg
Автор

multi_Dimention_list = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
count_time = 0
def chck_multiDimention(lst):
global count_time
for i in lst:
count_time+=1
return count_time

TheAshu
Автор

sir! here is my solution:

list1 = [1, 2, 3, [1, 2], [3, 4]]
def count_lists_inside_list(l):
count = 0
for i in l:
if type(i) == list:
count+= 1
return count
print(f"number of sublists in list1 are:\

zeeshanakram
Автор

ara = [1, 2, 3, [23, 22], [3.12, "Shamim", "Abdullah", "8982"], [3, 2, 1, 2], ["Virat", "Mashrafe", "Dhoni", "Anushka"]]
sum=0
for i in ara:
if(type(i) == list):
sum+=1
print(sum)

shamimsarker
Автор

How can I take these type of input from user?

harshitngupta
Автор

def list_finder(l):
total = 0
[total := total + 1 for i in l if type(i)==list]
return total

TheDev
Автор

Input=["baseball", "a, all, b, ball, bas, base, cat, code, de, e, quiz, z"]
Output="base, ball"
I need answer for this program can anybody plz help me out

satyabratanayak
join shbcf.ru