In the image you can see i am starting with a list with three element, but if you look at the output its outputting 4, this is because i am using insert, when you use insert you need to define where you want the element to go and then the value to be placed in there, its a very simple concept to do and understand.
Next is count, this is as you would think, so in the () you enter a value that is in the list and it will output the count of all values, it wont add the elements, it just counts so you can see how many are there. Lastly we have clear which is self explanatory, it just clears the list
1
12 reads
CURATED FROM
IDEAS CURATED BY
Keep reading, keep studying, the more you learn the more you change. If you are doing the Python lessons please join this discord channel https://discord.gg/kugXx9KY but please follow the rules
Continue learning about lists
“
Similar ideas to Learning Python: Inserting to a list plus clearing
So as you can see from the image we are using 2 variables, x and y. Like in the previous lessons explained about variables, x contains the string Hello World, what makes it a string is " " the use of these quotation marks. Next in y there is a integer value 10. Then i am adding them both together...
As you can see in the image, we are working with conditional if statements. This is used to find out if something is True or False. As you can see i used '
In this part we will be going over more on variables and printing them.
So let's make a variable and give it the value of 10, so it should look something like this X = 10, X could be any word really just not a reserved word, here is a link to a website with alot of reserved words that can't...
Read & Learn
20x Faster
without
deepstash
with
deepstash
with
deepstash
Personalized microlearning
—
100+ Learning Journeys
—
Access to 200,000+ ideas
—
Access to the mobile app
—
Unlimited idea saving
—
—
Unlimited history
—
—
Unlimited listening to ideas
—
—
Downloading & offline access
—
—
Supercharge your mind with one idea per day
Enter your email and spend 1 minute every day to learn something new.
I agree to receive email updates