My Free Exercise To Eliminate Same Elements Of A List ...

My free exercise to eliminate same elements of a list ...

My Free Exercise To Eliminate Same Elements Of A List ...

Post #20: Two exercises by @elu-xx with an interesting suggestion for improvement. How can I code the first exercise shorter and on another way?, 2023.

14/04/23 - Day 14

list = [1, 2, 4, 4, 1, 4, 2, 6, 2, 9]
new_list =[]

for i in list:
    if i not in new_list:
        new_list.append(i)

list = new_list[:]
print(f"The list with unique elements only: {list}")

Today I finished the section about lists!

The script above deletes from the list the elements that appear more than once.

I also did this program:

#FIND THE LOCATION OF A ELEMENT IN A LIST

list =[1,2,3,4,5,6,7,8,9,10]
to_find = 5
found = False

for i in range(len(list)):
    found = list[i] == to_find
    if found == True:
        break

if found == True:
    print(f"Element found at {i}")    
else:
    print("Element not found")

It goes through the list to find an element and it output the position of the element.

More Posts from Python-programming-language and Others

Python Tutorial #21 Konzept der Objektorientierung ...

Python Tutorial #21 Konzept Der Objektorientierung ...

Post #81: YouTube, Programmieren Starten, Python Tutorial, #21/24, Das Konzept der Objektorientierung (OOP), 2023.


Tags

Computer Science and OOP in Python ...

My source code of the exercise ...

Computer Science And OOP In Python ...
Computer Science And OOP In Python ...
Computer Science And OOP In Python ...

The output of my source code ...

Computer Science And OOP In Python ...

Post 78: MIT - Massachusetts Institute of Technology, Open Course Ware, Dr. Ana Bell, Object Oriented Programming, Introduction to computer science and programming in Python, 2023.


Tags

Python Tutorial #8, Zuweisungsoperator ...

The source code of my exercise ...

Python Tutorial #8, Zuweisungsoperator ...

The output of my source code ...

Python Tutorial #8, Zuweisungsoperator ...

Post #29: YouTube, Programmieren-Starten, #8 Der Zuweisungsoperator und die kombinierten Zuweisungsoperatoren, 2023.


Tags

Python Tutorial #16 Die For-Schleife 1 ...

The source code of my exercise ...

Python Tutorial #16 Die For-Schleife 1 ...
Python Tutorial #16 Die For-Schleife 1 ...
Python Tutorial #16 Die For-Schleife 1 ...

The output of my source code ...

Python Tutorial #16 Die For-Schleife 1 ...
Python Tutorial #16 Die For-Schleife 1 ...

Post #61: YouTube, Programmieren-Starten, Python Tutorial #16 Schleifen in Python - Die For-Schleife, 2023.


Tags
Ein Richtig Gutes Taschenbuch Für Den Einstieg In Die Programmiersprache "Python". Das Buch Ist Zwar

Ein richtig gutes Taschenbuch für den Einstieg in die Programmiersprache "Python". Das Buch ist zwar schlank, aber trotzdem ausführlich und kompetent. Michael Weigend gehört für mich zu den besten deutschsprachigen Autoren zur Programmierung mit Python, der verständlich schreibt und ein solides Fachwissen vermittelt.

Post #27: Michael Weigend, Python 3 Schnelleinstieg, Programmieren lernen in 14 Tagen, mitp Verlag, Frechen, 2021.


Tags

Learn Python with Free Tutorial - TechVidvan

Learn Python With Free Tutorial - TechVidvan

Source: Techvidvan

TechVidvan
Python is one of the most popular programming languages created by Guido van Rossum. It is a high-level, general-purpose, and object-oriente

Post #67: TechVidvan, offers an excellent Python Tutorial, 2023.


Tags

Niklaus Wirth

15.2.1934 - 1.1.2024

Niklaus Wirth: "Eine Optimierung beim Programmieren erfordert Zeit"
MIT Technology Review
Der am 1. Januar 2024 verstorbene Niklaus Wirth entwickelte die Programmiersprache Pascal. Im Interview von 2016 prangert er die Qualität be

Niklaus Wirth war gebürtiger Schweizer, studierte Ingenieur-Wissenschaften und war auch als Informatiker tägig gewesen. Er entwarf die Programmiersprache "PL360", die 1968 auf dem "IBM System/360" implementiert wurde. Weiterhin beteiligte sich Wirth an der Weiterentwicklung und Verallgemeinerung der Sprache "Algol". Insbesondere schuf er in Zusammenarbeit mit Tony Hoare die Sprache "Algol W" und wirkte an der Entwicklung von "Algol 68" mit. Enttäuscht über die stetig zunehmende Komplexität der Entwürfe zu dieser Sprache definierte und implementierte er in den Jahren 1968 bis 1972 praktisch im Alleingang die Programmiersprache "Pascal".

Quelle: Wikipedia

Post #110: Heise Online, Niklaus Wirth, Eine Optimierung beim Programmieren erfordert Zeit, 2024.


Tags

Eine umfangreiche Einführung in Python 3 ...

Eine Umfangreiche Einführung In Python 3 ...
Eine Umfangreiche Einführung In Python 3 ...

Post #96: Bernd Klein, Einführung in Python 3 für Ein- und Umsteiger, Hansa Verlag, 2. Auflage, 494 Seiten, 2014.


Tags
Loading...
End of content
No more pages to load
  • bradtylr
    bradtylr liked this · 1 year ago
  • therizossinhh
    therizossinhh liked this · 1 year ago
  • jeremyvlegros
    jeremyvlegros liked this · 2 years ago
  • anonymoushippo17
    anonymoushippo17 liked this · 2 years ago
  • the-sofa69
    the-sofa69 liked this · 2 years ago
  • tenpin999
    tenpin999 liked this · 2 years ago
  • canofwormed
    canofwormed liked this · 2 years ago
  • sams-nuts
    sams-nuts liked this · 2 years ago
  • rightpinkie
    rightpinkie liked this · 2 years ago
  • psychicdetectivebread
    psychicdetectivebread liked this · 2 years ago
  • poisoncain
    poisoncain liked this · 2 years ago
  • azoart
    azoart liked this · 2 years ago
  • curtainwindows
    curtainwindows liked this · 2 years ago
  • xpc-web-dev
    xpc-web-dev liked this · 2 years ago
  • streetart-everywhere
    streetart-everywhere liked this · 2 years ago
  • missiles-of-nuclear-justice
    missiles-of-nuclear-justice liked this · 2 years ago
  • callmemercury
    callmemercury liked this · 2 years ago
  • vegetus-vox
    vegetus-vox liked this · 2 years ago
  • pinkwerewolftree
    pinkwerewolftree liked this · 2 years ago
  • andrewharlan
    andrewharlan liked this · 2 years ago
  • fruberry01
    fruberry01 liked this · 2 years ago
  • somniphobicfox
    somniphobicfox liked this · 2 years ago
  • variablecemetery
    variablecemetery liked this · 2 years ago
  • burnt-out-galaxy
    burnt-out-galaxy liked this · 2 years ago
  • tinnybearinc
    tinnybearinc reblogged this · 2 years ago
  • elu-xx
    elu-xx reblogged this · 2 years ago
  • elu-xx
    elu-xx reblogged this · 2 years ago
  • python-programming-language
    python-programming-language reblogged this · 2 years ago
  • python-programming-language
    python-programming-language liked this · 2 years ago
  • basic-retro-programming
    basic-retro-programming reblogged this · 2 years ago
  • basic-retro-programming
    basic-retro-programming reblogged this · 2 years ago
  • basic-retro-programming
    basic-retro-programming liked this · 2 years ago
  • fatepony
    fatepony reblogged this · 2 years ago
  • fatepony
    fatepony liked this · 2 years ago
  • jukain4216
    jukain4216 liked this · 2 years ago
  • imjustaguy-01
    imjustaguy-01 liked this · 2 years ago
  • occasional-ygo
    occasional-ygo liked this · 2 years ago
  • slvrcodr
    slvrcodr reblogged this · 2 years ago
  • guylet-456
    guylet-456 reblogged this · 2 years ago
  • guylet-456
    guylet-456 liked this · 2 years ago
  • surfrgeek
    surfrgeek liked this · 2 years ago
  • code-es
    code-es reblogged this · 2 years ago
python-programming-language - Python Programming
Python Programming

Fan, Exploration & Learning Page

173 posts

Explore Tumblr Blog
Search Through Tumblr Tags