Python Pioneers: A Beginner's Guide 🇪🇹
Ir al canal en Telegram
Welcome to Python Pioneers: Empowering Ethiopian students to embark on their coding journey. 📢 Channel: @python_pioneers 👥 Group: @python_pioneers_com
Mostrar más8 874
Suscriptores
Sin datos24 horas
-277 días
-13630 días
Archivo de publicaciones
2. Accessing List Using Slicing Operator
Slicing ማለት የአንድን main list sublist ወይም የፈለግናቸውን elements ለይተን የምናወጣበት መንገድ ነው።
Syntax : list_name[start : stop : step]start : Sliceኡ ዬት እንደሚጀምር represent ያረጋል, default value 0 ነው። stop : represents the end index where slice should end. ▫️allow የሚደረግ max value = (last index + 1 ) ▫️ምንም value ካልተሰጠው የ listኡን last element index as default ይወስዳል። step : slice በሚደረጉ elements መሀከል ያለውን index value increment represent ያረጋል አንድን list slice አርገን የምናገኘው ሌላ list ነው። i.e. it returns a list. #Slicing #Lists @python_pioneers
29 jul 2024, 13:56
Examples: Accessing Elements
First Element:
my_list = [10, 20, 30, 40, 50]
print(my_list[0]) # Output: 10
Last Element:
print(my_list[-1]) # Output: 50
Third Element:
print(my_list[2]) # Output: 30
#Indexing
#Examples
#Lists
@python_pioneers29 jul 2024, 13:47
First Element:
my_list = [10, 20, 30, 40, 50]
print(my_list[0]) # Output: 10
Last Element:print(my_list[-1]) # Output: 50
Third Element:print(my_list[2]) # Output: 30
`
#Examples
#Indexing
@python_pioneers29 jul 2024, 13:45
29 jul 2024, ~13:45
Accessing Lists in Python
በPython ስለ list ምንነትና ባህሪያት ሌላው ደግሞ እንዴት እንደሚፈጠሩ አይተን ነበር። አሁን ደግሞ የአንድ list content እንዴት access ማረግ እንደምንችል እናያለን።
List access ለማረግ የምንጠቀማቸው ወደ 3 መንገዶች አሉ፡
1. By using indexing
Indexing ማለት የአንድን list element point የምናረግበት መንገድ ነው።
Syntax : list_name[index_number]Accessing the elements by index ማለት, elements በlistኡ ውስጥ ባሉበት ቦታ access ሲደረጉ ነው። Index ደግሞ የሚጀምረው ከ0 ነው። ያ ማለት የአንድ list first element index ቁጥሩ 0 ነው። List index positive ም negative ም ሊሆን ይችላል። Positive index indexing ከግራ ወደቀኝ እንደሆነ ይነግረናል በተቃራኒው ደግሞ negative index ከቀኝ ወደ ግራ represent ያረጋል። ...to be contd #AccessingLists #Indexing @python_pioneers
29 jul 2024, 13:34
➡️⏭
Next : Accessing a List in Python
⌚️8 : 30 EAT
...
29 jul 2024, 13:20
The skills and abilities that you possess won’t be useful if you’re not in the right environment.መልካም ምሽት ይሁንላችሁ! #Quotes @python_pioneers
26 jul 2024, 14:54
አስተማሪ ታሪክ ነው በትግስት አንብቡት
What a Waste:
A mother camel and her baby were lying down, soaking up the sun. The baby camel asked his mom, “Why do we have these big bumps on our back?”
The mom stopped to think and then said, “We live in the desert where there is not much water available. Our humps store water to help us survive on long journeys. “
The baby camel then stopped to think and said, “Well, why do we have long legs with rounded feet?”
His mother replied, “They are meant to help us walk through sand.”
The baby asked a third question, “Why are my eyelashes so long?”
The mother replied, “Your long eyelashes offer you protection from sand when it blows in the wind.”
Finally, the baby said, “If we have all of these natural abilities given to us to walk through the desert, what’s the use for camels in the Zoo?”
The Moral:
The skills and abilities that you possess won’t be useful if you’re not in the right environment.You’ve probably heard of a professional who ditched his or her career to follow their dreams–or the person who remains unfulfilled in their job, but doesn’t try to make a change. If you’re stuck in a career that isn’t the right fit, you have to do some self-reflection to realize where your strengths lie that are going to waste. Turn to people that you know the best as well as professionals in any given market so you can start thinking about what may be better for you. Think big and remain open to new ideas. #EnglishStories #Inspiration @python_pioneers @python_pioneers
26 jul 2024, 14:47
+9
Wallpapers for Programmers
#Wallpapers
@python_pioneers
26 jul 2024, 14:24
5. Why are lists preferred for storing a collection of data items in Python?
25 jul 2024, 14:00
4. Why are lists commonly used in Python?
25 jul 2024, 13:58
3. How do you create a list in Python?
25 jul 2024, 13:54
2. How do you create an empty list in Python?
25 jul 2024, 13:52
1. Which of the following statements is true about Python lists?
25 jul 2024, 13:49
Test your knowledge about basics of lists in python with these👇 questions
25 jul 2024, 13:48
