title
#26 Python Tutorial for Beginners | Array in Python
description
Telusko Courses:
Java Simplified LiveCourse : https://bit.ly/java-pro-telusko
Advance Java with Spring Boot Live Course : https://bit.ly/adv-java-telusko
Complete java developer Course : https://bit.ly/complete-java
Coupon Code: TELUSKO10 (10% off)
Udemy Courses:
Java:- https://bit.ly/JavaUdemyTelusko
Spring:- https://bit.ly/SpringUdemyTelusko
Java For Programmers:- https://bit.ly/javaProgrammers
For More Queries WhatsApp or Call on : +919008963671
website : https://courses.telusko.com/
Instagram : https://www.instagram.com/navinreddyofficial/
Linkedin : https://in.linkedin.com/in/navinreddy20
TELUSKO Android App : https://bit.ly/TeluskoApp
In this lecture we are dicussing about for else loop:
-- The for-else loop in Python is a control flow structure that combines the for loop and else
statement. The for loop iterates over a sequence of items, and the else statement is executed
after the loop is completed, provided that the loop was not terminated prematurely by a break statement.
Here's the basic syntax:
for item in sequence:
# loop body
else:
# else block
-- The sequence can be any iterable object, such as a list, tuple, or string. The loop body is executed
once for each item in the sequence, and the item variable takes on the value of each item in turn.
-- If the loop completes normally, without encountering a break statement, then the else block is executed.
This can be useful for executing cleanup code or performing some final action after the loop is finished.
nums=[12,15,18,21,26]
#get first number divisble by 5 print from list and we want if number is not divisible by 5 then print not found every time
for num in nums:
if num% 5==0:
print(num)
break
else:
print("not found")
#get first number divisble by 5 print from list and we want if number is not divisible by 5 then print not found once
nums=[23,24,27,38,29]
for num in nums:
if num% 5==0:
print(num)
break
else:
print("not found")
Github :- https://github.com/navinreddy20/Python-
Python for Beginners :- http://bit.ly/3JOLQhl
Java:- https://bit.ly/JavaUdemyTelusko
Spring:- https://bit.ly/SpringUdemyTelusko
More Learning :
Java :- https://bit.ly/3x6rr0N
Python :- https://bit.ly/3GRc7JX
Django :- https://bit.ly/3MmoJK6
JavaScript :- https://bit.ly/3tiAlHo
Node JS :- https://bit.ly/3GT4liq
Rest Api :-https://bit.ly/3MjhZwt
Servlet :- https://bit.ly/3Q7eA7k
Spring Framework :- https://bit.ly/3xi7buh
Design Patterns in Java :- https://bit.ly/3MocXiq
Docker :- https://bit.ly/3xjWzLA
Blockchain Tutorial :- https://bit.ly/3NSbOkc
Corda Tutorial:- https://bit.ly/3thbUKa
Hyperledger Fabric :- https://bit.ly/38RZCRB
NoSQL Tutorial :- https://bit.ly/3aJpRuc
Mysql Tutorial :- https://bit.ly/3thpr4L
Data Structures using Java :- https://bit.ly/3MuJa7S
Git Tutorial :- https://bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
https://www.telusko.com
detail
{'title': '#26 Python Tutorial for Beginners | Array in Python', 'heatmap': [{'end': 488.402, 'start': 417.32, 'weight': 0.864}, {'end': 652.92, 'start': 621.633, 'weight': 0.85}, {'end': 787.935, 'start': 752.341, 'weight': 0.763}], 'summary': "Tutorial covers python arrays, highlighting their ability to store values of the same type, flexibility in size, and methods for adding and finding elements. it also discusses integer data handling, differences between unsigned and signed integers, and emphasizes the importance of specifying the proper type code. furthermore, it demonstrates working with characters and integers in python using for and while loops for array manipulation, emphasizing python's simplicity and efficiency compared to other languages.", 'chapters': [{'end': 291.61, 'segs': [{'end': 33.188, 'src': 'embed', 'start': 4.451, 'weight': 0, 'content': [{'end': 8.333, 'text': "Welcome back aliens, my name is Devind Reddy and let's continue with the series on Python.", 'start': 4.451, 'duration': 3.882}, {'end': 11.034, 'text': "In this video, we're going to talk about arrays.", 'start': 8.793, 'duration': 2.241}, {'end': 15.756, 'text': 'Now we have worked with list, we have worked with tuple and now we know how those things works.', 'start': 11.514, 'duration': 4.242}, {'end': 21.939, 'text': 'So if you want to have a list of values with you, of course you can go with list or if you want to make it constant, you can go for tuple.', 'start': 16.015, 'duration': 5.924}, {'end': 24.16, 'text': 'Now, why array then?', 'start': 22.519, 'duration': 1.641}, {'end': 33.188, 'text': 'now, in array we need to have all the values of same type, so we can have the same list with integer, float and string in one list.', 'start': 24.62, 'duration': 8.568}], 'summary': 'Devind reddy discusses arrays in python, emphasizing uniform data type.', 'duration': 28.737, 'max_score': 4.451, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I4451.jpg'}, {'end': 74.93, 'src': 'embed', 'start': 44.419, 'weight': 2, 'content': [{'end': 47.141, 'text': 'if you say it is float array, all the values should be float.', 'start': 44.419, 'duration': 2.722}, {'end': 48.922, 'text': "There's one advantage here.", 'start': 47.842, 'duration': 1.08}, {'end': 52.543, 'text': "Aries in Python, they don't have specific size.", 'start': 49.382, 'duration': 3.161}, {'end': 56.144, 'text': "They don't have fixed size, which means you can expand, you can shrink it.", 'start': 52.583, 'duration': 3.561}, {'end': 60.346, 'text': "Example, let's say if you have five values and if you think, hey, we want 10 values, you can expand it.", 'start': 56.224, 'duration': 4.122}, {'end': 64.967, 'text': 'And if you feel, hey, we have 10 values, but we need only four values now, we can shrink it.', 'start': 60.626, 'duration': 4.341}, {'end': 69.308, 'text': 'So, it is quite flexible to work with and it offers you certain methods to work with.', 'start': 65.346, 'duration': 3.962}, {'end': 71.809, 'text': 'For example, if you want to add elements, you can use append.', 'start': 69.328, 'duration': 2.481}, {'end': 74.93, 'text': 'If you want to find a particular element, you can use certain methods.', 'start': 72.149, 'duration': 2.781}], 'summary': 'Python arrays are flexible; can expand or shrink, with methods like append.', 'duration': 30.511, 'max_score': 44.419, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I44419.jpg'}, {'end': 153.883, 'src': 'embed', 'start': 109.905, 'weight': 1, 'content': [{'end': 113.186, 'text': 'instead of doing that, we can create an array right now.', 'start': 109.905, 'duration': 3.281}, {'end': 114.507, 'text': 'how do we do that?', 'start': 113.186, 'duration': 1.321}, {'end': 122.491, 'text': 'so, in order to use array, we will be using array, but then the problem is we will not be getting this array by default, right, okay?', 'start': 114.507, 'duration': 7.984}, {'end': 126.894, 'text': 'so we need to import a module called as array to use this.', 'start': 122.491, 'duration': 4.403}, {'end': 127.654, 'text': 'so how will you do that?', 'start': 126.894, 'duration': 0.76}, {'end': 130.697, 'text': 'you will say import array, right.', 'start': 127.654, 'duration': 3.043}, {'end': 131.378, 'text': 'so this is up to you.', 'start': 130.697, 'duration': 0.681}, {'end': 136.124, 'text': 'so you have to say import array, and in this module array we have a function called as array.', 'start': 131.378, 'duration': 4.746}, {'end': 137.927, 'text': 'so we have to say array, dot array.', 'start': 136.124, 'duration': 1.803}, {'end': 138.888, 'text': 'this is how you create an array.', 'start': 137.927, 'duration': 0.961}, {'end': 139.709, 'text': 'i know.', 'start': 138.888, 'duration': 0.821}, {'end': 141.271, 'text': "uh, it's a lot of edges there.", 'start': 139.709, 'duration': 1.562}, {'end': 149.219, 'text': "so if you don't want to use this array every time, you can also use array, so you can say import array as arr.", 'start': 141.271, 'duration': 7.948}, {'end': 153.883, 'text': 'so instead of using array every time, you can say arr dot array, this one way.', 'start': 149.219, 'duration': 4.664}], 'summary': "Creating and using arrays using python, including importing the array module and using it with 'import array' or 'import array as arr'.", 'duration': 43.978, 'max_score': 109.905, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I109905.jpg'}, {'end': 261.491, 'src': 'embed', 'start': 233.395, 'weight': 5, 'content': [{'end': 236.696, 'text': 'in fact, in integer as well, we have different types of integers.', 'start': 233.395, 'duration': 3.301}, {'end': 239.777, 'text': 'we have byte, we have long, and we have int.', 'start': 236.696, 'duration': 3.081}, {'end': 242.078, 'text': 'when you work with different languages like c, c++, java.', 'start': 239.777, 'duration': 2.301}, {'end': 243.038, 'text': 'we have these types there.', 'start': 242.078, 'duration': 0.96}, {'end': 245.319, 'text': 'right, we have byte, we have long.', 'start': 243.038, 'duration': 2.281}, {'end': 248.16, 'text': 'we have int same way in here in python.', 'start': 245.319, 'duration': 2.841}, {'end': 249.762, 'text': 'we also have int.', 'start': 248.16, 'duration': 1.602}, {'end': 251.443, 'text': 'now depend upon you know.', 'start': 249.762, 'duration': 1.681}, {'end': 255.967, 'text': 'the moment you change the type, it will change the size in the memory example.', 'start': 251.443, 'duration': 4.524}, {'end': 261.491, 'text': 'if you want to say hey, i want a smaller integer, you can say byte, because byte is a small integer.', 'start': 255.967, 'duration': 5.524}], 'summary': 'Different types of integers like byte, long, and int are available in languages like c, c++, and java, with byte being the smallest integer type.', 'duration': 28.096, 'max_score': 233.395, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I233395.jpg'}], 'start': 4.451, 'title': 'Python arrays', 'summary': 'Introduces python arrays, highlighting their ability to store values of the same type, flexibility in size, and methods for adding and finding elements, making them a more efficient alternative to lists and tuples. it also discusses creating and working with arrays in python, including importing the array module, specifying array types, and understanding memory allocation for different data types.', 'chapters': [{'end': 109.905, 'start': 4.451, 'title': 'Python arrays: a flexible and efficient data structure', 'summary': 'Introduces python arrays, highlighting their ability to store values of the same type, flexibility in size, and methods for adding and finding elements, making them a more efficient alternative to lists and tuples.', 'duration': 105.454, 'highlights': ['Arrays in Python allow storing values of the same type, offering flexibility in size and methods for adding and finding elements, making them a more efficient alternative to lists and tuples.', 'Arrays in Python do not have a fixed size, allowing for easy expansion or shrinking, providing flexibility in managing data efficiently.', 'The chapter explains the need for arrays in cases where variables for each element of a list are required, highlighting the potential efficiency in handling large datasets.']}, {'end': 291.61, 'start': 109.905, 'title': 'Working with python arrays', 'summary': 'Discusses creating and working with arrays in python, including importing the array module, specifying array types, and understanding memory allocation for different data types.', 'duration': 181.705, 'highlights': ['To create an array in Python, you need to import the array module and use the array function, allowing for type-specific memory allocation, such as int, float, and character, with varying memory sizes.', 'Importing the array module and using the array function enables the creation of arrays with uniform data types, such as int, float, and character, each requiring different memory allocations.', 'Understanding the memory allocation for different data types in Python arrays is crucial, as it determines the size and storage requirements, with int, float, and character types having varying memory allocations.']}], 'duration': 287.159, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I4451.jpg', 'highlights': ['Arrays in Python allow storing values of the same type, offering flexibility in size and methods for adding and finding elements, making them a more efficient alternative to lists and tuples.', 'To create an array in Python, you need to import the array module and use the array function, allowing for type-specific memory allocation, such as int, float, and character, with varying memory sizes.', 'Arrays in Python do not have a fixed size, allowing for easy expansion or shrinking, providing flexibility in managing data efficiently.', 'Importing the array module and using the array function enables the creation of arrays with uniform data types, such as int, float, and character, each requiring different memory allocations.', 'The chapter explains the need for arrays in cases where variables for each element of a list are required, highlighting the potential efficiency in handling large datasets.', 'Understanding the memory allocation for different data types in Python arrays is crucial, as it determines the size and storage requirements, with int, float, and character types having varying memory allocations.']}, {'end': 667.797, 'segs': [{'end': 346.078, 'src': 'embed', 'start': 291.61, 'weight': 0, 'content': [{'end': 294.732, 'text': 'now the question is What if you want to have unsigned integer?', 'start': 291.61, 'duration': 3.122}, {'end': 296.133, 'text': 'Now, what is unsigned and signed?', 'start': 294.772, 'duration': 1.361}, {'end': 301.817, 'text': "So let's say, if you're going for normal integer, it goes from a negative range to a positive range, right?", 'start': 296.153, 'duration': 5.664}, {'end': 304.039, 'text': "What if you don't want to store a negative value?", 'start': 302.097, 'duration': 1.942}, {'end': 310.323, 'text': 'In that case, you will be going for a unsigned integer, because it starts with zero and it ends at a particular value.', 'start': 304.159, 'duration': 6.164}, {'end': 312.925, 'text': 'So we will not be considering negative numbers here.', 'start': 310.783, 'duration': 2.142}, {'end': 314.846, 'text': 'right and you can see the table.', 'start': 313.385, 'duration': 1.461}, {'end': 315.766, 'text': 'we have all the types.', 'start': 314.846, 'duration': 0.92}, {'end': 319.187, 'text': 'so if you want to work with unsigned integer, you have to use capital i.', 'start': 315.766, 'duration': 3.421}, {'end': 323.348, 'text': 'if you want to use sign integer, which is long one, you can use small l right.', 'start': 319.187, 'duration': 4.161}, {'end': 323.688, 'text': 'so you can.', 'start': 323.348, 'duration': 0.34}, {'end': 326.009, 'text': "you can refer this table and we'll be using that here.", 'start': 323.688, 'duration': 2.321}, {'end': 331.091, 'text': 'so i want to create a array of integers, and the way you can do that is by saying i,', 'start': 326.009, 'duration': 5.082}, {'end': 337.474, 'text': "because you are using an integer array and you can give a comma And you have to mention a square bracket, because that's how you represent arrays.", 'start': 331.091, 'duration': 6.383}, {'end': 339.475, 'text': 'Now in this square bracket, you can mention values.', 'start': 337.694, 'duration': 1.781}, {'end': 342.316, 'text': 'I will go for simple values here just to, you know, make it simple.', 'start': 339.915, 'duration': 2.401}, {'end': 346.078, 'text': 'So I will say 5, 9, 8, 4, and 2.', 'start': 342.336, 'duration': 3.742}], 'summary': 'Using unsigned integers to store only non-negative values in an array of integers.', 'duration': 54.468, 'max_score': 291.61, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I291610.jpg'}, {'end': 488.402, 'src': 'heatmap', 'start': 417.32, 'weight': 0.864, 'content': [{'end': 426.302, 'text': 'okay, now, once we have done with that in array, as we are working with arrays now, we can use certain functions, example if i say values dot.', 'start': 417.32, 'duration': 8.982}, {'end': 429.103, 'text': 'so one of my favorite function is buffer info.', 'start': 426.302, 'duration': 2.801}, {'end': 432.504, 'text': 'now buffer info will give you the size of the array right.', 'start': 429.103, 'duration': 3.401}, {'end': 435.866, 'text': 'so if i say Okay, we were supposed to change this, i small i.', 'start': 432.504, 'duration': 3.362}, {'end': 438.488, 'text': 'so let me undo this code and you can see we got something.', 'start': 435.866, 'duration': 2.622}, {'end': 442.03, 'text': 'Now what is this something? So this is a tuple here with two things.', 'start': 438.608, 'duration': 3.422}, {'end': 444.352, 'text': 'The first one is the address.', 'start': 442.091, 'duration': 2.261}, {'end': 449.816, 'text': 'so this is the address of your array, and the second parameter there is actually your size, which is 5, right?', 'start': 444.352, 'duration': 5.464}, {'end': 456.221, 'text': 'If I change the number of elements here, if I remove 2, of course you will be getting 4 values now, so it will be 4..', 'start': 450.417, 'duration': 5.804}, {'end': 459.927, 'text': "right. so that's how you can work with buffer info.", 'start': 456.221, 'duration': 3.706}, {'end': 463.372, 'text': 'in fact, we have some other methods as well, i would say values dot.', 'start': 459.927, 'duration': 3.445}, {'end': 468.92, 'text': "in fact, we also have type code which will print the type of the code you're working with, which is int in this case.", 'start': 463.372, 'duration': 5.548}, {'end': 471.103, 'text': 'so you can see this i, which is integer.', 'start': 468.92, 'duration': 2.183}, {'end': 472.224, 'text': 'this was the property here.', 'start': 471.103, 'duration': 1.121}, {'end': 474.827, 'text': 'now, What if you want to add a value? You can use append.', 'start': 472.224, 'duration': 2.603}, {'end': 476.95, 'text': 'What if you want to remove a value? You can use remove.', 'start': 474.867, 'duration': 2.083}, {'end': 479.312, 'text': 'If you want to reverse the entire array, you can do that here.', 'start': 477.09, 'duration': 2.222}, {'end': 480.453, 'text': "Example, let's try.", 'start': 479.773, 'duration': 0.68}, {'end': 485.959, 'text': "So if I say reverse, and if I print the values, and if I say F10, because reverse doesn't return value.", 'start': 480.473, 'duration': 5.486}, {'end': 488.402, 'text': 'So if you want to work with reverse, you have to say val.append.', 'start': 486.32, 'duration': 2.082}], 'summary': 'Using buffer info function to get array size, and additional array manipulation methods like append and reverse.', 'duration': 71.082, 'max_score': 417.32, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I417320.jpg'}, {'end': 488.402, 'src': 'embed', 'start': 463.372, 'weight': 2, 'content': [{'end': 468.92, 'text': "in fact, we also have type code which will print the type of the code you're working with, which is int in this case.", 'start': 463.372, 'duration': 5.548}, {'end': 471.103, 'text': 'so you can see this i, which is integer.', 'start': 468.92, 'duration': 2.183}, {'end': 472.224, 'text': 'this was the property here.', 'start': 471.103, 'duration': 1.121}, {'end': 474.827, 'text': 'now, What if you want to add a value? You can use append.', 'start': 472.224, 'duration': 2.603}, {'end': 476.95, 'text': 'What if you want to remove a value? You can use remove.', 'start': 474.867, 'duration': 2.083}, {'end': 479.312, 'text': 'If you want to reverse the entire array, you can do that here.', 'start': 477.09, 'duration': 2.222}, {'end': 480.453, 'text': "Example, let's try.", 'start': 479.773, 'duration': 0.68}, {'end': 485.959, 'text': "So if I say reverse, and if I print the values, and if I say F10, because reverse doesn't return value.", 'start': 480.473, 'duration': 5.486}, {'end': 488.402, 'text': 'So if you want to work with reverse, you have to say val.append.', 'start': 486.32, 'duration': 2.082}], 'summary': 'Demonstration of array manipulation with append, remove, and reverse operations, using int type code.', 'duration': 25.03, 'max_score': 463.372, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I463372.jpg'}, {'end': 568.238, 'src': 'embed', 'start': 543.094, 'weight': 3, 'content': [{'end': 548.22, 'text': 'But I want to print all the values, not just one or two values, right? In this case, we will be using a loop.', 'start': 543.094, 'duration': 5.126}, {'end': 552.49, 'text': 'your favorite loop you can work with, while loop you can work with for loop, your wish.', 'start': 549.108, 'duration': 3.382}, {'end': 557.492, 'text': 'okay, here i will go for look for loop, because for loop makes sense when you know the range.', 'start': 552.49, 'duration': 5.002}, {'end': 563.675, 'text': 'so i will say for i, in where in in fact, i will be using range, i will start with.', 'start': 557.492, 'duration': 6.183}, {'end': 568.238, 'text': 'our range will go till four or five, because we have five values right.', 'start': 563.675, 'duration': 4.563}], 'summary': 'Using a for loop to print all five values from a range.', 'duration': 25.144, 'max_score': 543.094, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I543094.jpg'}, {'end': 652.92, 'src': 'heatmap', 'start': 621.633, 'weight': 0.85, 'content': [{'end': 625.257, 'text': 'So length of valves will give you the length and you can pass that length in range right?', 'start': 621.633, 'duration': 3.624}, {'end': 630.342, 'text': 'So indirectly, you know, at runtime it will be range 5, right?, Because the size is 5..', 'start': 625.277, 'duration': 5.065}, {'end': 631.483, 'text': 'and it works.', 'start': 630.342, 'duration': 1.141}, {'end': 631.843, 'text': 'now this.', 'start': 631.483, 'duration': 0.36}, {'end': 633.425, 'text': 'this is another way of printing.', 'start': 631.843, 'duration': 1.582}, {'end': 637.408, 'text': 'all what you can do is, instead of saying range, you can directly say vals.', 'start': 633.425, 'duration': 3.983}, {'end': 645.014, 'text': 'so i will say for e, even i works, but then i will say for e in val and i can directly print the value of e.', 'start': 637.408, 'duration': 7.606}, {'end': 646.615, 'text': 'so for is very dynamic, you know.', 'start': 645.014, 'duration': 1.601}, {'end': 652.92, 'text': 'so sometimes you can use for with range, which will go for index values, or here it will directly go for the values.', 'start': 646.615, 'duration': 6.305}], 'summary': "Using 'for' with 'range' or 'vals' for dynamic iteration with length and values.", 'duration': 31.287, 'max_score': 621.633, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I621633.jpg'}], 'start': 291.61, 'title': 'Integer data handling', 'summary': 'Discusses the differences between unsigned and signed integers, emphasizing their use cases and ranges. additionally, it showcases creating and manipulating integer arrays, addressing issues with value types and emphasizing the importance of specifying the proper type code.', 'chapters': [{'end': 326.009, 'start': 291.61, 'title': 'Unsigned vs. signed integers', 'summary': 'Explains the concept of unsigned and signed integers, highlighting the differences and use cases, emphasizing that unsigned integers start with zero and end at a particular value, and providing guidance on their usage and notation.', 'duration': 34.399, 'highlights': ['Unsigned integers start with zero and end at a particular value, eliminating the storage of negative numbers, providing a clear use case for their application.', "The transcript discusses the distinction between signed and unsigned integers, emphasizing the usage of capital 'I' for unsigned integers and small 'l' for signed integers.", 'Explanation of the concept of unsigned and signed integers, providing clarity on their respective ranges and use of notation.']}, {'end': 667.797, 'start': 326.009, 'title': 'Working with integer arrays', 'summary': 'Demonstrates creating and printing an integer array, highlighting issues with invalid value types and showcasing array manipulation methods such as reverse and iteration with range and length, with an emphasis on the importance of specifying the proper type code.', 'duration': 341.788, 'highlights': ["The chapter begins by demonstrating the creation of an integer array with simple values such as 5, 9, 8, 4, and 2, emphasizing the use of square brackets and the 'i' prefix for integers.", 'It then showcases the printing of the integer array and highlights the error that occurs when attempting to use a float value in an integer array, providing a clear example of the issue.', "The importance of specifying the proper type code for the array is emphasized, distinguishing between 'i' for signed integers and 'I' for unsigned integers, with examples and error demonstrations.", 'Methods for array manipulation are demonstrated, including buffer info to obtain the size of the array, type code to print the type of code used, append to add a value, remove to remove a value, and reverse to reverse the entire array, with clear examples and outputs provided.', 'The chapter concludes by showcasing iteration through the array using a for loop with range and dynamic length, as well as a for loop directly iterating through the values, highlighting the flexibility and dynamic nature of array iteration.']}], 'duration': 376.187, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I291610.jpg', 'highlights': ['Unsigned integers start with zero and end at a particular value, providing a clear use case for their application.', "The importance of specifying the proper type code for the array is emphasized, distinguishing between 'i' for signed integers and 'I' for unsigned integers.", 'Methods for array manipulation are demonstrated, including buffer info, type code, append, remove, and reverse, with clear examples and outputs provided.', 'The chapter concludes by showcasing iteration through the array using a for loop with range and dynamic length, highlighting the flexibility and dynamic nature of array iteration.', "The chapter begins by demonstrating the creation of an integer array with simple values such as 5, 9, 8, 4, and 2, emphasizing the use of square brackets and the 'i' prefix for integers."]}, {'end': 943.905, 'segs': [{'end': 696.968, 'src': 'embed', 'start': 668.217, 'weight': 3, 'content': [{'end': 669.617, 'text': 'Okay, so this thing is working.', 'start': 668.217, 'duration': 1.4}, {'end': 673.919, 'text': 'Now can I work with characters because we have seen how to work with integers.', 'start': 669.958, 'duration': 3.961}, {'end': 675.679, 'text': 'We can also use float here.', 'start': 674.439, 'duration': 1.24}, {'end': 678.06, 'text': 'Can I work with characters? Of course you can.', 'start': 676.08, 'duration': 1.98}, {'end': 682.122, 'text': 'So what you have to do is instead of saying I, you have to say you which is unique code.', 'start': 678.12, 'duration': 4.002}, {'end': 683.202, 'text': 'You can say characters.', 'start': 682.282, 'duration': 0.92}, {'end': 686.463, 'text': 'And here instead of having numbers, we should be using characters.', 'start': 683.882, 'duration': 2.581}, {'end': 689.264, 'text': 'I will say single quotes, a single quote.', 'start': 686.543, 'duration': 2.721}, {'end': 692.886, 'text': 'E and then single quote I.', 'start': 690.024, 'duration': 2.862}, {'end': 696.968, 'text': 'So we have AEI and then if I run this code you can see we got the same values.', 'start': 692.886, 'duration': 4.082}], 'summary': "Coding with characters, 'aei' returns same values as integers.", 'duration': 28.751, 'max_score': 668.217, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I668217.jpg'}, {'end': 738.166, 'src': 'embed', 'start': 708.934, 'weight': 2, 'content': [{'end': 710.674, 'text': 'okay, with the same values.', 'start': 708.934, 'duration': 1.74}, {'end': 711.635, 'text': 'example, i will just.', 'start': 710.674, 'duration': 0.961}, {'end': 714.976, 'text': 'i will just take positive values now, five, nine, eight, four, two.', 'start': 711.635, 'duration': 3.341}, {'end': 718.177, 'text': 'i want to create a new array with the same values.', 'start': 714.976, 'duration': 3.201}, {'end': 719.197, 'text': 'is it possible?', 'start': 718.177, 'duration': 1.02}, {'end': 720.237, 'text': 'of course you can do it right.', 'start': 719.197, 'duration': 1.04}, {'end': 722.198, 'text': 'you can say a new array here.', 'start': 720.237, 'duration': 1.961}, {'end': 725.639, 'text': 'i will say new array and equal to you can say the same thing.', 'start': 722.198, 'duration': 3.441}, {'end': 727.859, 'text': 'you can say array and then i then comma.', 'start': 725.639, 'duration': 2.22}, {'end': 735.844, 'text': 'you can put the same values, but instead of doing that, what you can do is you can say array Bracket and in this bracket you can mention.', 'start': 727.859, 'duration': 7.985}, {'end': 738.166, 'text': "Hey, I don't know the type C.", 'start': 735.864, 'duration': 2.302}], 'summary': 'Creating a new array with positive values: 5, 9, 8, 4, 2.', 'duration': 29.232, 'max_score': 708.934, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I708934.jpg'}, {'end': 787.935, 'src': 'heatmap', 'start': 752.341, 'weight': 0.763, 'content': [{'end': 759.388, 'text': "just take the type from vals instead of saying i, you're simply saying type code from val and then the values.", 'start': 752.341, 'duration': 7.047}, {'end': 760.509, 'text': "now i don't know the values.", 'start': 759.388, 'duration': 1.121}, {'end': 762.611, 'text': 'so you can say now we have a different syntax here.', 'start': 760.509, 'duration': 2.102}, {'end': 763.792, 'text': 'try to understand this.', 'start': 762.611, 'duration': 1.181}, {'end': 768.937, 'text': "so what we are saying is hey, i don't know the values, but take the values from vals.", 'start': 763.792, 'duration': 5.145}, {'end': 770.859, 'text': 'so take the values a.', 'start': 768.937, 'duration': 1.922}, {'end': 776.885, 'text': 'now a will represent one value at a time, a for a in valse.', 'start': 770.859, 'duration': 6.026}, {'end': 783.311, 'text': 'So what will happen now is it will, so this for loop will take one one value from valse and it will assign to the array.', 'start': 777.445, 'duration': 5.866}, {'end': 787.935, 'text': 'So it will say hey I got five assigned, I got nine assigned.', 'start': 783.611, 'duration': 4.324}], 'summary': 'Using vals, values are assigned to array iteratively.', 'duration': 35.594, 'max_score': 752.341, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I752341.jpg'}, {'end': 880.516, 'src': 'embed', 'start': 851.628, 'weight': 1, 'content': [{'end': 854.872, 'text': "So it's so simple to do all this stuff in Python, you know.", 'start': 851.628, 'duration': 3.244}, {'end': 858.695, 'text': 'If you do want to do the same thing in other languages, you have to write multiple lines of code.', 'start': 855.472, 'duration': 3.223}, {'end': 862.82, 'text': "And that's why we say, you know, in Python, you can do multiple things in less number of lines.", 'start': 858.976, 'duration': 3.844}, {'end': 866.323, 'text': 'now, what if you want to print these values using while loop again?', 'start': 863.32, 'duration': 3.003}, {'end': 868.725, 'text': 'we have done with for, so we know how it works.', 'start': 866.323, 'duration': 2.402}, {'end': 869.986, 'text': 'can we use while loop here?', 'start': 868.725, 'duration': 1.261}, {'end': 870.807, 'text': 'of course we can.', 'start': 869.986, 'duration': 0.821}, {'end': 873.43, 'text': 'you know, a lot of people have this confusion with for and while.', 'start': 870.807, 'duration': 2.623}, {'end': 880.516, 'text': 'you can use while loop here as well now, but the thing is, for while loop, you have to use three steps right, you have to use initialization,', 'start': 873.43, 'duration': 7.086}], 'summary': 'Python allows doing more with fewer lines, including using while loops.', 'duration': 28.888, 'max_score': 851.628, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I851628.jpg'}, {'end': 943.905, 'src': 'embed', 'start': 922.115, 'weight': 0, 'content': [{'end': 928.54, 'text': 'right, but you can use while loop so now there are more to add is, in fact we have so many things to work with areas now.', 'start': 922.115, 'duration': 6.425}, {'end': 931.002, 'text': 'so in this video we have talked about the basics of array.', 'start': 928.54, 'duration': 2.462}, {'end': 933.664, 'text': 'how can we create an array and how can you print the values?', 'start': 931.002, 'duration': 2.662}, {'end': 937.006, 'text': 'how can you create a different array from from the existing array?', 'start': 933.664, 'duration': 3.342}, {'end': 938.007, 'text': "so that's it from this video.", 'start': 937.006, 'duration': 1.001}, {'end': 939.028, 'text': 'i hope you are enjoying the series.', 'start': 938.007, 'duration': 1.021}, {'end': 941.75, 'text': "let me know in the comment section, do click the like button if you're enjoying it.", 'start': 939.028, 'duration': 2.722}, {'end': 942.771, 'text': 'thank you so much for watching everyone.', 'start': 941.75, 'duration': 1.021}, {'end': 943.905, 'text': 'Bye-bye.', 'start': 943.294, 'duration': 0.611}], 'summary': 'Covered basics of arrays: creation, printing values, and creating new arrays. end of video.', 'duration': 21.79, 'max_score': 922.115, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I922115.jpg'}], 'start': 668.217, 'title': 'Python arrays and loops', 'summary': "Demonstrates working with characters and integers in python, including unique codes and single quotes, new array creation, and the use of for and while loops for array manipulation. it emphasizes python's simplicity and efficiency compared to other languages, highlighting array basics and manipulation.", 'chapters': [{'end': 708.934, 'start': 668.217, 'title': 'Working with characters and integers', 'summary': 'Demonstrates working with characters and integers in python, including the use of unique codes and single quotes, and creating a new array.', 'duration': 40.717, 'highlights': ['Working with characters, including the use of unique codes and single quotes.', 'Working with integers and creating a new array.']}, {'end': 943.905, 'start': 708.934, 'title': 'Python arrays and loops', 'summary': 'Demonstrates the creation of a new array with the same values as the original array and the use of for and while loops to manipulate the array values, with an emphasis on the simplicity and efficiency of python in comparison to other languages. it also highlights the basics of array creation and manipulation.', 'duration': 234.971, 'highlights': ['The chapter demonstrates the creation of a new array with the same values as the original array and the use of for and while loops to manipulate the array values.', 'It emphasizes the simplicity and efficiency of Python in comparison to other languages, showcasing that tasks requiring multiple lines of code in other languages can be accomplished in a few lines in Python.', 'The tutorial highlights the basics of array creation and manipulation, focusing on creating a new array from existing array values and printing array values using for and while loops.']}], 'duration': 275.688, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/6a39OjkCN5I/pics/6a39OjkCN5I668217.jpg', 'highlights': ['The tutorial highlights the basics of array creation and manipulation, focusing on creating a new array from existing array values and printing array values using for and while loops.', 'It emphasizes the simplicity and efficiency of Python in comparison to other languages, showcasing that tasks requiring multiple lines of code in other languages can be accomplished in a few lines in Python.', 'Working with integers and creating a new array.', 'Working with characters, including the use of unique codes and single quotes.']}], 'highlights': ['Arrays in Python allow storing values of the same type, offering flexibility in size and methods for adding and finding elements, making them a more efficient alternative to lists and tuples.', 'To create an array in Python, you need to import the array module and use the array function, allowing for type-specific memory allocation, such as int, float, and character, with varying memory sizes.', 'Unsigned integers start with zero and end at a particular value, providing a clear use case for their application.', 'The tutorial highlights the basics of array creation and manipulation, focusing on creating a new array from existing array values and printing array values using for and while loops.', "The importance of specifying the proper type code for the array is emphasized, distinguishing between 'i' for signed integers and 'I' for unsigned integers.", 'Arrays in Python do not have a fixed size, allowing for easy expansion or shrinking, providing flexibility in managing data efficiently.', 'Importing the array module and using the array function enables the creation of arrays with uniform data types, such as int, float, and character, each requiring different memory allocations.', 'Understanding the memory allocation for different data types in Python arrays is crucial, as it determines the size and storage requirements, with int, float, and character types having varying memory allocations.', 'The chapter explains the need for arrays in cases where variables for each element of a list are required, highlighting the potential efficiency in handling large datasets.', 'Methods for array manipulation are demonstrated, including buffer info, type code, append, remove, and reverse, with clear examples and outputs provided.', 'The chapter concludes by showcasing iteration through the array using a for loop with range and dynamic length, highlighting the flexibility and dynamic nature of array iteration.', "The chapter begins by demonstrating the creation of an integer array with simple values such as 5, 9, 8, 4, and 2, emphasizing the use of square brackets and the 'i' prefix for integers.", 'It emphasizes the simplicity and efficiency of Python in comparison to other languages, showcasing that tasks requiring multiple lines of code in other languages can be accomplished in a few lines in Python.', 'Working with integers and creating a new array.', 'Working with characters, including the use of unique codes and single quotes.']}