General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
swallowedinthesea11
NetworkChuck
comments
Comments by "swallowedinthesea11" (@swallowedinthesea11) on "Adding stuff to a Python List" video.
PyInstaller.
2
If you want to develop 3D games, stick with C++ because Python can only develop 2D.
2
@petevenuti7355 Sorry, misunderstood. I never tried it until now, but it seems like you can: import inspect, random # Line 1 # inspect module enables you to view the source code # random is just a random module print( inspect.getsource(random) ) # Line 5 # use the getsource() method to view the source code of the random module The random module's source code is 1086 lines. I just copy/pasted everything to the top of my file and wrote the following. This is important: after pasting all the source code, you have to erase Lines 1 and 5: dice = randrange(1, 7) # no need to write random.randrange() since the source code is already included print(dice) Hope this helped.
2
You can only append one argument at a time.
1
With everything so far that Chuck has taught, it's possible to make a text-based Elden Ring. I'm currently working on a small scaled one. It's good practice to test yourself.
1
Disliked? bool( 'OP is a Karen' )
1
'why not return to the list and add it there?' Do you mean like have someone manually enter items? This would defeat the purpose of automation. 'what practical use is there for these methods of appending items to a list?' Imagine Belle logging into her Tiktok. She wants to include some employees she trusts to have privileges to manage her account. She goes to settings and it has a feature to add people. With each name she enters, it appends to the list of approved users. Or people make fun of Belle because she has the last name Delphine. She can make a Death Note program where it appends her enemies' names.
1
Learn them from other tutorials here.
1
bool( 'OP is a Karen' )
1
LOL, what a coincidence that he mentioned Elden Ring because I started making a text version of Elden Ring in Python three days ago.
1
Coffee, without the cream and sugar, is healthy, especially coffee eʼnemas which I do twice every month.
1
If this is the last video, there's another tutorial by a different user with 32 million views.
1
Make sure you are using square brackets, not parenthesis. x = [ 0, 300, 999 ] x.append( 'I love sushi with wasabi!' ) print(x)
1
@Anime-Enthusiasts I encountered that too and still do at times. Whenever you face a problem, try to thoroughly check the code. Don't skim through it forcing yourself to find that culprit because that will do more harm than good. I've spent hours trying to find why my code wasn't working by glancing everywhere like a madman when all I had to do was to fix a simple syntax error. All the best!
1
Nice, but you were close. You have to convert 7000 into a string by using the str() function because concatenating only works for strings: print("Methods" + "=" + str(7000)) You can get around this by using f-strings as concatenating is pretty old and the extra work of converting nonstrings into strings is tedious: print( f"Methods=7000" )
1
Use the append method to add onto the end of a list: roleModels = [ 'Alanah Pearce', 'Kim Kardashian' ] roleModels.append( 'Belle Delphine' ) print(roleModels) Use the insert method to add to a position: roleModels = [ 'Alanah Pearce', 'Kim Kardashian' ] roleModels.insert( 1, 'Belle Delphine' ) # at index 1 print(roleModels) # [ 'Alanah Pearce', 'Belle Delphine', 'Kim Kardashian' ]
1
@raresmulea6875 Yes, that works too!
1
Yes, it's possible to make a basic text RPG like The Witcher.
1
No clue about C,, but modules are just a collection of classes and functions you can use by importing into your file. If you wanted a module of supervillain names, you could import the module or make such a module.
1
@petevenuti7355 You're welcome!
1
You forgot the parenthesis after method.
1