Comments (23)
hp_list = list()
hp_list.append("Draco")
hp_list.append("Harry")
hp_list.append("Hermione")
hp_list.append("Ron")
hp_list.append("Severus")
print (hp_list)
from 2020-2021.
FIRST METHOD
hp_list= list()
hp_list.append("Draco")
hp_list.append("Harry")
hp_list.append("Hermione")
hp_list.append("Ron")
hp_list.append("Severus")
print (hp_list)
SECOND METHOD
hp1_list= ["Draco", "Harry", "Hermione", "Ron", "Severus"]
print (hp1_list)
THIRD METHOD
hp2_list= list()
hp2_list.append("Harry")
hp2_list.append("Severus")
hp2_list.append("Hermione")
hp2_list.append("Ron")
hp2_list.append("Draco")
hp2_list.sort()
print(hp2_list)
from 2020-2021.
my_list_hp=list()
my_list_hp.append("Draco")
my_list_hp.append("Harry")
my_list_hp.append("Hermione")
my_list_hp.append("Ron")
my_list_hp.append("Severus")
print(my_list_hp)
from 2020-2021.
my_list= list()
my_list.append("Harry")
my_list.append("Draco")
my_list.append("Hermione")
my_list.append("Severus")
my_list.append("Ron")
my_list.sort()
print(my_list)
from 2020-2021.
lista_hp = list['Draco', 'Harry', 'Hermione', 'Ron', 'Severus']
print(lista_hp)
from 2020-2021.
#FIRST METHOD
Harry_potter_list = list()
Harry_potter_list.append("Draco")
Harry_potter_list.append("Harry")
Harry_potter_list.append("Hermione")
Harry_potter_list.append("Ron")
Harry_potter_list.append("Severus")
print(Harry_potter_list)
#SECOND METHOD
Harry_potter_list = list()
Harry_potter_list.append("Hermione")
Harry_potter_list.append("Draco")
Harry_potter_list.append("Severus")
Harry_potter_list.append("Ron")
Harry_potter_list.append("Harry")
Harry_potter_list.sort()
print(Harry_potter_list)
#THIRD METHOD
Harry_potter_list = ["Draco", "Harry", "Hermione", "Ron", "Severus"]
print(Harry_potter_list)```
from 2020-2021.
my_list = list()
my_list.append("Draco")
my_list.append("Harry")
my_list.append("Hermione")
my_list.append("Ron")
my_list.append("Severus")
print(my_list)
from 2020-2021.
#with user input
names_list = input('Enter each name separed by a comma: ').split(', ')
print(sorted(names_list))
#without user input
names_list = list()
names_list.append("Severus")
names_list.append("Harry")
names_list.append("Ron")
names_list.append("Hermione")
names_list.append("Draco")
print(sorted(names_list))
from 2020-2021.
my_list = list()
my_list.append("Draco")
my_list.append("Harry")
my_list.append("Hermione")
my_list.append("Ron")
my_list.append("Severus")
print(my_list)
from 2020-2021.
harry_potter_names = list()
harry_potter_names.append("Draco")
harry_potter_names.append("Harry")
harry_potter_names.append("Hermione")
harry_potter_names.append("Ron")
harry_potter_names.append("Severus")
from 2020-2021.
my_hp_list = list()
my_hp_list.append("Draco")
my_hp_list.append("Harry")
my_hp_list.append("Hermione")
my_hp_list.append("Ron")
my_hp_list.append("Severus")
print(my_hp_list)
from 2020-2021.
hp_list = list()
hp_list.append("Draco")
hp_list.append("Harry")
hp_list.append("Hermione")
hp_list.append("Ron")
hp_list.append("Severus")
print(hp_list)
from 2020-2021.
hogwarts_list = list()
hogwarts_list.append("Draco")
hogwarts_list.append("Harry")
hogwarts_list.append("Hermione")
hogwarts_list.append("Ron")
hogwarts_list.append("Severus")
print(hogwarts_list)
from 2020-2021.
my_list = list()
my_list.append("Draco")
my_list.append("Harry")
my_list.append("Hermione")
my_list.append("Ron")
my_list.append("Severus")
print(my_list)
from 2020-2021.
harry_list = list()
harry_list.append("Harry")
harry_list.append("Severus")
harry_list.append("Hermione")
harry_list.append("Ron")
harry_list.append("Draco")
harry_list.sort()
print(harry_list)
from 2020-2021.
potter_list= list()
potter_list.append("Draco")
potter_list.append("Harry")
potter_list.append("Hermione")
potter_list.append("Ron")
potter_list.append("Severus")
print (potter_list)
from 2020-2021.
mylist = []
mylist.append("harry")
mylist.append("draco")
mylist.append("hermione")
mylist.append("ron")
mylist.append("severus")
print(mylist)
from 2020-2021.
harry_potter_list = list()
harry_potter_list.append("Draco")
harry_potter_list.append("Harry")
harry_potter_list.append("Hermione")
harry_potter_list.append("Ron")
harry_potter_list.append("Severus")
print(harry_potter_list)
from 2020-2021.
HP_list = list()
HP_list.append("Harry")
HP_list.append("Draco")
HP_list.append("Hermione")
HP_list.append("Ron")
HP_list.append("Severus")
HP_list.sort()
print(HP_list)
from 2020-2021.
HPE=list()
HPE.append("Draco")
HPE.append("Harry")
HPE.append("Hermione")
HPE.append("Ron")
HPE.append("Severus")
print(HPE)
from 2020-2021.
potter_list = []
potter_list.append("Harry")
potter_list.append("Draco")
potter_list.append("Hermione")
potter_list.append("Ron")
potter_list.append("Severus")
potter_list.sort()
print(potter_list)
from 2020-2021.
hp_list = list()
hp_list.append('Harry')
hp_list.append("Draco")
hp_list.append("Hermione")
hp_list.append("Ron")
hp_list.append("Severus")
hp_list.sort()
print(hp_list)
from 2020-2021.
hp_characters = ["Hermione", "Ron", "Draco", "Harry"]
hp_characters.append("Severus")
hp_characters.sort()
from 2020-2021.
Related Issues (20)
- Lecture "Brute-force algorithms", exercise 5 HOT 15
- Lecture "Organising information: unordered structures", exercise 1 HOT 21
- Lecture "Organising information: unordered structures", exercise 2 HOT 19
- Lecture "Organising information: unordered structures", exercise 3 HOT 20
- Lecture "Recursion", exercise 1 HOT 19
- Lecture "Recursion", exercise 2 HOT 20
- Lecture "Divide and conquer algorithms", exercise 1 HOT 19
- Lecture "Divide and conquer algorithms", exercise 2 HOT 17
- Lecture "Divide and conquer algorithms", exercise 3 HOT 5
- Lecture "Dynamic programming algorithms", exercise 1 HOT 21
- Lecture "Dynamic programming algorithms", exercise 2 HOT 19
- Lecture "Organising information: trees", exercise 1 HOT 9
- Lecture "Organising information: trees", exercise 2 HOT 7
- Bonus exercise (AtariGo) HOT 2
- Lecture "Backtracking algorithms", exercise 1 HOT 6
- Lecture "Backtracking algorithms", exercise 2 HOT 5
- Lecture "Organising information: graphs", exercise 1 HOT 15
- Lecture "Organising information: graphs", exercise 2 HOT 14
- Lecture "Greedy algorithms", exercise 1 HOT 5
- Lecture "Greedy algorithms", exercise 2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 2020-2021.