Due to not seperated list by comma example : [ "Harry", "Lerry", "Jerry" + "Carry"] Len function adding two string if it is not seperated by comma in the list but other hand if it's a string then it will Count Every Character From the string but if any Variable contain multiple string then it will count string words: example: var = "Harry", "Lerry", "Jerry" + "Carry" print(var) Output is : 3 Var = "Harry" "Lerry" "Jerry" "Carry print(Var) # It will count the character due to does not seperated by any comman. Output is : 20
You forget comma (,) for example: 1 = ["Harry", "Larry", "Jarry" "Carry"] print(len(1)) # And there was missing comma in 3rd line so the result are 3 and 2nd example: 1=["Harry", "Larry", "Jarry", "Carry"] # there was no missing comma (,) print(len(1)) # therefore the result are 4
@@8-bitrage982 Watch the video carefully. There are 2 commas, not 3. And python doesnt counts commas, it counts the element after the comma. Since, "jerry" and "carry" were not seperated with commas, it joined the 2 strings together to make it a single element.
Comma is missing between Jerry and Carry so Python is accepting 2 strings as a single unit string so length is 3..BTW I just got into Python I am kid lol
Yah indexing ki vajah se hua Hai python main indexing zero se start hoti hai isliye 0,1,2,3 to total elements 3 dikha raha hai but actually four hai direct account karte Hain tho
@@_SushmaGoyal I'm not, but listen in linked list program you use pop() keyword right? There you can add pop(0) or pop(1) or any number u want in the specific range so i told (0) does counts
Simple, comma is missing between Jerry and Carry which acts as a separator for lists in various programming languages including Python. Thus the AI cannot separate and count Here and Carry as two different words and the length returns to be 3
Because compiler operates in binary! Starts interpreting with Zero! If there are 4 elements in the list then it starts with zero, one, two ,and three! As return Three!
Indexing starts from 0, so in the memory :- 0th index - Harry 1st index - Larry 2nd index - Jerry 3rd index - Carry Therefore, counting from 0, the length is 3 🤝🏻
Naa bro in len() function it automatically adds 1 from the index, the main problem here is that he didn't put a comma after Jerry that's why python is thinking there are only 3 strings in the list. There is no indexing problem.
3 hi aayega because 3rd and 4th item ke bich comma nahi hai, python me kisi bhi list item ko comma se hi separate kiya jaa sakta hai agar do list item ke bich me comma nahi lagaya jata to in dono items ko ek hi item consider karega. You are doing a great work Harry Bhai hat's off ❤ #harrybhai
Because there is no comma between "Jerry" and "Carry". So the it counted both of them as a single element instead of counting them as two different elements.
Naa bro in len() function it automatically adds 1 from the index, the main problem here is that he didn't put a comma after Jerry that's why python is thinking there are only 3 strings in the list. There is no indexing problem.
Guys if you are a Python developer and can't solve this then you are not taking things seriously The answer is 3 because he put 4 items and in python, we count from 0 so 1 = 0, 2 = 1, 3 = 2, 4 = 3 That's why the length is coming 3
because didn't use 3 commas to separate the strings that's why last two elements were considered as single element Wait but the len() starts counting from 0 🤔🤔🤔🤔
because python’s list always start with counting from 0 and then 1 then 2 then 3, so Harry is 0 then Larry is 1 then Jerry is 2 then Carry is the 3rd that’s why it print’s the length of the list to be 3 Tell me if i am correct or wrong
Do we have any code in python or in Linux for shifting column to rows data like. Input file like Input.txt have below data Shyam 1 2 3 Shyam 7 2 Shyam X Y Z A Required output.txt have below data Shyam 1, 2, 3 Shyam 7, 2 Shyam X, Y, Z, A
Due to not seperated list by comma example : [ "Harry", "Lerry", "Jerry" + "Carry"] Len function adding two string if it is not seperated by comma in the list but other hand if it's a string then it will Count Every Character From the string but if any Variable contain multiple string then it will count string words:
example:
var = "Harry", "Lerry", "Jerry" + "Carry"
print(var)
Output is : 3
Var = "Harry" "Lerry" "Jerry" "Carry
print(Var) # It will count the character due to does not seperated by any comman.
Output is : 20
wtf
Bro c hai kya
comma ( , ) is missing b/w Jerry and Carry.
"Code never lies" 😂
but harry does
Lul
rohit..rohit raj...mai comma dalega nahi sala 😂
🤣
😂🤣😂🤣😂
You : forgot to add a,
Your code : Ekdin mar jayega 🤣
harry mast teacher ha pura developer harry bhai sa dartaha
Legends opening comment section as soon as hears the question 🤣🤣
bhai unhe legends nhi nalaik kehete hain
I got the answer and to confirm it I opened comments section
🤣🤣
ultra legends opening comment section to answer the question.
You forget comma (,)
for example:
1 = ["Harry",
"Larry",
"Jarry"
"Carry"]
print(len(1))
# And there was missing comma in 3rd line so the result are 3
and 2nd example:
1=["Harry",
"Larry",
"Jarry",
"Carry"]
# there was no missing comma (,)
print(len(1))
# therefore the result are 4
you didn't put a comma between "Jerry" and "Carry"
so it evaluates to "Jerry""Carry" (a single element) and hence the length is 3.
no it evaluates as "JerryCarry"
Yes exactly it considered as one element
numering in python starts with 0 like 0,1,2,3
i am so late
@@abhinavmalviya6934 Not in case of len()
List counting starts from ( 0,1,2,3 )
One of the irritating scenes when you get invalid syntax after multiple tries. 😓
Because jerry and carry were 2 souls in 1 body 😂
lol but python starts counting from 0 like in whole numbers and count's comma's as list length
@@8-bitrage982 I know. You just didn't get the joke.
@@rexes6000 got it but there were 3 comma's and python count's the comma's so the answer was 3
@@8-bitrage982 Watch the video carefully. There are 2 commas, not 3. And python doesnt counts commas, it counts the element after the comma. Since, "jerry" and "carry" were not seperated with commas, it joined the 2 strings together to make it a single element.
@@rexes6000 i did the practical using 4 commas and the answer was 4 try doing the practical then tell
Jaaduu haryy bhai jaaduuu😂😂
I Think You Forgot A Comma Between The Strings "Jerry" And "Carry", It's String Concatenation
If is intended
But, where is the concatenation operator?
15 second mein galti pakad li maine 😂 comma bhul gaye
Harry bhai trying to hide his smile while he leaves a comma intentionally🤔🤔
very important part thankyou
"Jerry" and "Carry" is not seperated by comma thus resembles a single element
I have a Challenge For You sir : Write This Code True,True,True == (True,True,True) in python and Why it is output
I am a java programmer
Lol
You Ans In Java boolean tr = True == (True*[3]) System.out.println(tr.substring(2));
tr = tr.replace('2', '2.4');
The ans in java is False/True
what are you doing now'
Iske baad gilharry...😂😂😂
Q K array Hai,
Indices 0 1 2 3
Na , comma missing
Jis se 🐍 dono 🧵 ko add kar deta hai
"Jerry" and "carry" implicitly converted into a single string
Tum to bade havvy developer ho ji
This way it should be 4
@@VenomGamingnp can't you see that comma is missing
Comma is missing between Jerry and Carry so Python is accepting 2 strings as a single unit string so length is 3..BTW I just got into Python I am kid lol
Because the last element of the list is "JerryCarry" not "Carry"
This is because comma (,) was not added after "Jerry"
Harry Bhaiya
Python Gamming tutorial dalo plz
I know they show 3 because forward ⏩ indexing start as 0123
me after checking my cgpa: 0:14
Underrated
😅
Yah indexing ki vajah se hua Hai python main indexing zero se start hoti hai isliye 0,1,2,3 to total elements 3 dikha raha hai but actually four hai direct account karte Hain tho
forget to add , after jerry
bro forget the comma between jerry and carry, code never lies😂
Jerry aur carry ke beech me comma nahi hai
Because of index Start from 0 to n.
Means 3 ka matlab hai 0,1,2,3
hahahah I was confuse but I watched it again and realized he didn't insert comma( , ) after Jerry
You forget the comma between Jerry and carry 😂
There is a comma missing after Jerry and before Carry, hence both are taken as a simple list item
th-cam.com/video/aVTWxtgtgAI/w-d-xo.html
This is because you havent added comma between " jerry" and " carry" Thats why they are converted into single string ie. "jerrycarry".
"Jerry" and "carry" converted into a single string
Then it will tow because in python counting start from 0,1,2 like this
@@mrdevel6664 lmao but that's length it begins from 1 in every single language.
@@mrdevel6664 be it English Chinese Japanese C C# Java Python whatnot xd
@@Nathan477 no it begins with 0 he told in his python course
Humse chalaki nahi chalegi bhaiya..😅😂
Because - In python counting starts from zero
No, this rule is only for index,
Here he didn't put a coma between "jerry" and "carry" so it's like "jerry""carry",that is why len is 3
Comma Mein nhi jao comma(,) is missing
U didn't use , before carry isliye 3 aa rha he
Phele Jerry phir carry aur phir lorry 😅😅
I am not a Python developer but i think u don't write one a komha aftet Jerry.
Am i right???
In any language the count of a list takes the first term as zero(0), second term as(1), third as(2), fourth as(3), that's why
You are right
@@Anonymous-wz9rk No, bro.
@@Anonymous-wz9rk length = no of item in that list
What you're saying is indexing not length
Ohhk dude mb
indexing start from 0
0 is also counted
len() function doesn't work like that bro
tell me you're not a python developer before saying it
@@_SushmaGoyal I'm not, but listen in linked list program you use pop() keyword right?
There you can add pop(0) or pop(1) or any number u want in the specific range so i told (0) does counts
@@rudraray1665 but pop() does right?
Simple, comma is missing between Jerry and Carry which acts as a separator for lists in various programming languages including Python. Thus the AI cannot separate and count Here and Carry as two different words and the length returns to be 3
In python, indexing starts from 0 .
So, the first string was set to 0th index and the last string was set to 3rd index
In every language index starts from 0
Because compiler operates in binary! Starts interpreting with Zero! If there are 4 elements in the list then it starts with zero, one, two ,and three! As return Three!
In python count start from 0
So count will be 0,1,2,3
So output is 3
ou didn't put a comma between "Jerry" and "Carry"
so it evaluates to "Jerry""Carry" (a single element) and hence the length is 3.
Bro MARRY REHA GYA 😂🤣
List starts with 0
So,
O-larry
1-herry
2-jerry
3-carry
Indexing starts from 0, so in the memory :-
0th index - Harry
1st index - Larry
2nd index - Jerry
3rd index - Carry
Therefore, counting from 0, the length is 3 🤝🏻
Naa bro in len() function it automatically adds 1 from the index, the main problem here is that he didn't put a comma after Jerry that's why python is thinking there are only 3 strings in the list. There is no indexing problem.
3 is coming because it counts the index number. Index number always starts from 0
Because in python the counting is 0,1,2,3 🎉
Comma is missing.
3 hi aayega because 3rd and 4th item ke bich comma nahi hai, python me kisi bhi list item ko comma se hi separate kiya jaa sakta hai agar do list item ke bich me comma nahi lagaya jata to in dono items ko ek hi item consider karega. You are doing a great work Harry Bhai hat's off ❤
#harrybhai
This is the dark future of coding is AI replace the coders with in 5 years
Array ka consept 0,1,2,3
Because there is no comma between "Jerry" and "Carry". So the it counted both of them as a single element instead of counting them as two different elements.
Harry Minati ❤😂😂
Because length start from whole number Such as 0 that's why the answer is 3
Naa bro in len() function it automatically adds 1 from the index, the main problem here is that he didn't put a comma after Jerry that's why python is thinking there are only 3 strings in the list. There is no indexing problem.
Guys if you are a Python developer and can't solve this then you are not taking things seriously
The answer is 3 because he put 4 items and in python, we count from 0
so 1 = 0, 2 = 1, 3 = 2, 4 = 3
That's why the length is coming 3
Bro making the hybrid of a programmer (Harry) , a bodybuilder (Larry), a cartoon character (Jerry), and a roaster (Carry). ☠️
Because, "Jerry" don't contain ( , ) so the length will be counted from index 0 to end index
So the answer is 3.
because didn't use 3 commas to separate the strings that's why last two elements were considered as single element
Wait but the len() starts counting from 0
🤔🤔🤔🤔
In python counting start from zero
Jerry ke baad comma nahi hai iske Karan wo ek hi consider ho rahe
It count the index value .
Index value start from 0
3
(There is no seperation between the last two lines)
Coming from a non-IT background, I’ve decided to explore a career in Python by enrolling myself in Moonpreneur. Let’s see where this journey takes me!
Harry ,Larry, jerrycarry sahi to hai😂😂
because python’s list always start with counting from 0 and then 1 then 2 then 3,
so Harry is 0 then Larry is 1 then Jerry is 2 then Carry is the 3rd
that’s why it print’s the length of the list to be 3
Tell me if i am correct or wrong
No that's not about comma
It is because in pythan the length is counted like 0123. That's why it is showing 3 understood
Cause Last pushed value "jerry” ”carry” ,which doesn't have separator "," is considered as one value.
kyoki list me ginti 0 se start hoti hai 0,1,2,3
Len() starts with 1 bro
Index starts with 0 so the length is 0,1,2,3
Realized on first try that there is no comma between "Jerry" and "Larry"
You removed the comma which is typcaseted in same length....... 🤗🤗🤗😃😃😃
indexing starts from 0, that's why
Last me comma nahi tha.
0-herry 1-jarry 2-lerry 3-carry
Due to the absence of a comma (,) after Jerry. For this the compiler thinks that Jerry Carry is 1 element of the list L
Jerry ke baad comma nahi diye ho
Missing comma (,) 🤣🤣
Nice acting broo..👍🏻👍🏻😅
Indexing will be like 0,1,2 and hence length is 3
because in python list index start from 0 it means 4=3
Because python counts from 0. And you have written 4 it's means 3 valuse means 0,1,2,3
no comma between jerry and carry
Because in python, index start from 0
Missed the comma between 🐀 and 🛍
Jerry and Carry: Hum dono aik hi unit hain
it can be because : length of list is 4 the compiler subtract 1 from the list
Jerry ke baad comma nhi he bro, to uske wajah se vo sing string ban gyi that's why usme length 3 aa rhi he. Check if you don't believe!
Because in line 3 of list there is no comma so python merges the 3 and 4 string and make new 3rd string that's why answer is 3
Print aapne length ki to length print Hui hai
print (len(l)) o/p =3
Print (l) o/p= Herry Jerry Cerry
Because forward index start with 0 ,1,2,3
Because it starts from 0 like
Shyam 0
Ram 1
Nam 2
Kam 3
Output will be 3
Because it counts starts with 0,1,2,and3
Because you didn't use comma after 3rd string. So it merged as a one whole string
No comma after "Jerry" so it is treating Jerry and Carry and one
Do we have any code in python or in Linux for shifting column to rows data like.
Input file like Input.txt have below data
Shyam
1
2
3
Shyam
7
2
Shyam
X
Y
Z
A
Required output.txt have below data
Shyam 1, 2, 3
Shyam 7, 2
Shyam X, Y, Z, A
Where is the comma between Jerry and carry 😂😂😂
u didnt put comma between carry snd jerry i saw that 😂