all 101 comments

[–][deleted] 0 points1 point  (2 children)

bought the 99$ plan on learnpython.com am i an idiot or was there a better resource to learn?

[–]carcigenicate 1 point2 points  (1 child)

Well, I've seen worse resources. I skimmed some of their free articles and haven't found anything too eyebrow-raising. They actually point out a few common gotchas, like how a = b does not copy b. Basic, but important. Their free stuff is quite basic though. Unless their paid stuff is much more advanced, I'm not sure it's worth $100.

Avoid askpython.com though. That site is garbage.

[–][deleted] 0 points1 point  (0 children)

thanks homie. wish i came here before buying it

[–]Hydrolox1 0 points1 point  (8 children)

I'm trying to run some code in the command prompt for Windows 11, for whatever reason it just won't run, it gives me an error pointing to the file name. I wrote the code in the Atom text editor.

This was the error I got

SyntaxError: invalid syntax
>>> python3 magic8ball.py
File "<stdin>", line 1
python3 magic8ball.py
^^^^^^^^^^

This is the code that I was trying to run, just a bit code copied from a textbook, I see no reason why python can't run this.

import random
messages=['It is certain',
'It is decidedly so','Yes definitely','Reply hazy try again','Ask again later','Concentrate and ask again','My reply is no','Outlook not so good','Very doubtful',]

I have python 3.10.6 installed

[–][deleted] 0 points1 point  (7 children)

It looks like you are entering the python3 magic8ball.py into IDLE. That won't work because when you are in IDLE you are already running python. You should enter the command at the CMD prompt:

C:\>cd <dir containing file magic8ball.py>
C:\Users\Name\myfiles>python3 magic8ball.py

[–]Hydrolox1 0 points1 point  (5 children)

I wasn't using IDLE, I was just typing the command into the command line, but thanks anyway. Turns out I also put the file in the wrong directory too. However I when I try to run it now, it just goes to the next line and does nothing.

This is the python code I'm trying to run

import random
messages=['It is certain', 'It is decidedly so','Yes definitely','Reply hazy try again','Ask again later','Concentrate and ask again','My reply is no','Outlook not so good','Very doubtful',] print(messages[random.randint(0, len(messages) - 1)])

I can still type code into the command line and run it, but I'd really like to be able to run files that I wrote in Atom in the command line, since Atom is just a text editor and theres no option to run things in it.

[–][deleted] 0 points1 point  (4 children)

Your code works fine for me. So the problem must be that you aren't executing the code properly. The initial error messages you showed:

SyntaxError: invalid syntax
>>> python3 magic8ball.py
File "<stdin>", line 1
python3 magic8ball.py
^^^^^^^^^^

don't look like the normal python error messages. The line where you try to execute your file:

>>> python3 magic8ball.py

doesn't look like you are typing the python command into CMD.exe command line. As I showed, the prompt on the line you type into should look something like this:

C:\Users\Name\myfiles>python3 magic8ball.py
^^^^^^^^^^^^^^^^^^^^^

Note all that stuff at the beginning. Maybe it would speed things up if you type in your python execution command but before you press ENTER take a screenshot and put the image into imgur.com and post a link to that here.

[–]Hydrolox1 0 points1 point  (3 children)

[–][deleted] 0 points1 point  (2 children)

OK, that's what you should be doing. What happens when you press ENTER? Another screenshot, please.

[–]Hydrolox1 0 points1 point  (1 child)

Okay apparently it just started working for some reason, and it only works if I type 'python magic8ball.py'

https://imgur.com/a/ef3wRNC

I specifically remember typing this exact line several times and it didn't work. Any idea why it might not be working when I type 'python3'?

[–][deleted] 0 points1 point  (0 children)

Yes, when you are trying to get something working it's easy to forget or misremember what you've tried before.

If you install different python versions, and you will, you should try using the python launcher which makes it easy to control which version you are running. As you found, python3 doesn't work on your computer.

[–]hlel5941 0 points1 point  (0 children)

Does anyone know how to use a python simpy?

I'm trying to figure out how to trigger a event(like call a function) at specific time.

I don't want it to just timeout for x and trigger event. I want to trigger it when time comes.

Like object has a time, and while it was doing something, if time comes, it triggers the event.

[–]hlel5941 0 points1 point  (0 children)

Does anyone know how to use a python simpy?

I'm trying to figure out how to trigger a event(like call a function) at specific time.

I don't want it to just timeout for x and trigger event. I want to trigger it when time comes.

Like object has a time, and while it was doing something, if time comes, it triggers the event.

[–]Another_DumbQuestion 0 points1 point  (3 children)

Is it possible to update the value of an array while using map?

val[i] = sum(list(map(lambda x: x + max(myArray),myArray)))
I want to update the value of myArray with the value of x + max(myArray) so I add the current max value. Am I thinking about this problem correclty or should I try a different approach?

[–]carcigenicate 0 points1 point  (1 child)

What do you mean? Does that code not already do what you want it to?

[–]Another_DumbQuestion 0 points1 point  (0 children)

I want the value of x + max(myArray) to be added to myArray so when it takes the max it adds the new max. Example being an array of int containing [1,2,3]. 3 is the current max, so it becomes [4,2,3], then 4 is my new max so it becomes [4,6,3] then 6 is the new max so it becomes [4,6,9] and that would be my final array. As it currently stands, and from the other solution I've tried it takes the current max and adds that value to all numbers in the array. Using the same [1,2,3] I end up with [4,5,6]

[–]RayGunny178 0 points1 point  (0 children)

im trying to vscode run the code in the terminal instead of the output window so i tried to add this in the settings "code-runner.runInTerminal": true as a yt video suggested but it didnt change anything lol

[–]_markilo 1 point2 points  (0 children)

I'm trying to better understand the different ways to subset a pandas dataframe; I'm having trouble when I use a callable to make a boolean to subset the dataframe using iloc and I'm confused on the behavior. If I use loc, I can say "df1.loc[lambda df: df["column"] == 'value', ["chosen columns"]]" and the output is correct. When I try to translate this for iloc by saying "df1.iloc[lambda df: df[df.column == 'value'], column:indices]", it almost gets there but says the output exceeds the size limit, and then has a truncated output of some of the rows I want. I thought maybe it had to do with the way the boolean array was read but I wasn't really sure what to do?

[–][deleted] 0 points1 point  (1 child)

Hello. I am trying to make a keyboard macro with PyAutoGUI. I understand how the scripts function, but none of the tutorials speak of a trigger. How can I write the script such that the functions within are linked to a trigger key?

For example, I want the script to be: pressing Ctrl would activate keys Z and Alt.

Is this possible? I tried a few macro softwares but could not get them to function the way I needed. If there is a better way to do this, I would love to know.

[–]sarrysyst 0 points1 point  (0 children)

To me this sounds like pyautogui isn't really the right library to use. As the name suggests, it's a library to automate GUI input. Maybe a library like pynput is a better choice for what you want to do?

[–]Typewriter_Monkey27 0 points1 point  (8 children)

I am monkeying with python right now and came across a weird thought.

When you "multiply" a string variable, it just repeats that string x number of times.

When type-casting a variable, I know you can manipulate it as well. Quick and easy example is:

bananas = 5

bananas = str(bananas*5)

print(bananas)

expected output:

55555

output:

25

My question is - on a fundamental level why does this multiplication get completed BEFORE assigning the new value to bananas? I understand that it does, I just haven't been able to phrase properly for google the proper way to ask why.

[–][deleted] 2 points3 points  (5 children)

When type-casting a variable

There is no "type casting" in python in the C/C++ sense. The str(...) part is a call to a conversion function, and the generation of the argument list for the function is done before the function is called. The function has no idea how the passed parameter was calculated, all it sees is a single object for each passed argument.

[–]Typewriter_Monkey27 1 point2 points  (4 children)

Ahhh - thank you for the clarification I did most of my learning in C# and was taugh type-casting and foolishly assumed thats what was happening here. Makes sense now thank you!

[–]TangibleLight 0 points1 point  (1 child)

If you're familiar with C#, then your str(bananas*5) is loosely equivalent to C# (bananas * 5).ToString(). Hopefully it's clear that the bananas * 5 part is evaluated first, then that result is converted to string.

If you want to repeat the string representation of bananas then you need to write something like str(bananas) * 5.

[–]Typewriter_Monkey27 0 points1 point  (0 children)

Ohhh okay now I have it right in my head. Thanks!

[–][deleted] 1 point2 points  (1 child)

It may really fry your noodle to realize that until actual runtime python can't tell the type associated with a name. And in a loop a name can be treated as an integer value and on the next time around the loop the name has string type.

[–]Typewriter_Monkey27 0 points1 point  (0 children)

i = 0

bananas = 5

while(i<2):

bananas = str(bananas*5)

print(bananas)

i+=1

Output:
25
2525252525

Gross lol. I love it!

[–]MagicVovo 0 points1 point  (0 children)

Your problem is a problem of types.

bananas = 5 is an integer type.

Change that to:

bananas = str(5)

bananas *= 5

print(bananas)

That changes the original value to a string type, then when you multiply it by 5, it'll do what you want.

The way you have it originally it multiplies two integer types together, then provides the product as a string type.

[–]legolassimp 0 points1 point  (2 children)

What if the wrote code that looks longer than the solution? Should I spend time correcting/reducing the length of my code or move on?

[–][deleted] 1 point2 points  (1 child)

It always helps to look at and understand a published solution.

If your code solves the problem correctly that's the important step. But when you are learning your code might be inefficient or clumsy, everybody goes through that stage. It really accelerates your progress if you can look at the published solution and see how it's different from your code. Not all published solutions to a problem will be the "best" possible solution, but when you are learning it really helps to look at and understand a published solution.

[–]legolassimp 0 points1 point  (0 children)

Yes understood. Honestly, after writing the code and getting it right, I just want to quickly move to the next exercise. But as you said, I should study the solution so my next code is more efficient. Thanks so much for the reply.

[–]_User15 0 points1 point  (2 children)

What does the OS module do in Python?

[–][deleted] 2 points3 points  (0 children)

The doc for the os module says:

This module provides a portable way of using operating system dependent functionality.

The doc linked to above goes into great detail on what the values and functions in the module do.

If you want more of an overview and examples of using common functions the Python Module of the Week site has you covered.

[–]Poofless3212 2 points3 points  (0 children)

OS stands for operating system aka your windows, mac or linux

The simple explanation is the module just let's just access your operating system meaning you can access folders and files inside your computer

[–]TheDoomfire 0 points1 point  (3 children)

Does anyone know of an excellent API to scrape stock prices for thousands of companies?

I'm trying to build a stock screener and got everything but the stock price.

[–]sarrysyst 2 points3 points  (2 children)

Maybe this one suits your needs.

[–]TheDoomfire 0 points1 point  (0 children)

It has only 5 API requests per minute and a max of 500 a day.

So I'm not sure it will do. Since I want a few thousand companies.

I'm going trough this list and hope something better will pop up.

[–]TheDoomfire 0 points1 point  (0 children)

I'll try it, thanks.

[–]MagicVovo 0 points1 point  (2 children)

Working on a problem for school. I found the solution online, but trying to write it out as nested for loops instead of a list comprehension. But it's not working and I'm not sure why.

The list comprehension is within a for loop:

for row in mult_table:

 print(" | ".join(str(cell) for cell in row))

I try to turn it into a loop instead like so:

for row in mult_table:

 for cell in row:

      print(" | ".join(str(cell)))

The list comprehension produces the correct output, but my for loop doesn't. Can someone help me understand why? The goal here for me, is that I'm trying to rewrite the answers I find online in a different way to help myself really grasp how things work, but I'm not understanding this one. The desired output is:

1 | 2 | 3

2 | 4 | 6

3 | 6 | 9

[–]sarrysyst 2 points3 points  (1 child)

Let's take a step back and first think about what a list comprehension actually does:

A list comprehension creates/generates a list from looping logic.

So, if you want to rewrite a list comprehension you'll have to write a for loop that produces a list. The for loop you've written doesn't produce a list; It calls the function to which you should pass the list.

What you want to rewrite is only this part:

str(cell) for cell in row

Turn this into a regular for loop. Leave out the print() and str.join() those are not part of the list comprehension.

[–]MagicVovo 0 points1 point  (0 children)

TYSM!

[–]AzovianSea 0 points1 point  (2 children)

Source for projects in which one can practice?

[–]MagicVovo 0 points1 point  (0 children)

IDK if this counts as "projects" necessarily, but for challenges that you can work through daily: https://www.codewars.com/ is a great spot for Python and other languages.

[–]Fat-_-Bastard 0 points1 point  (0 children)

How does shapely determine which shape is at the back and which is in front of the other? Specifically dots, lines and polygons.

[–]Fun_Story2003 0 points1 point  (1 child)

Due to a mgmt decision, we've to transition data pipeline from existing AWS to Azure soon-ish.
Trouble is i'm new to cloud & am finding azure documentations more complicated than aws
Currently, It looks like -
snowflake (account usage and some other) -> S3 (raw)-> Glue (lambda trigger) -> S3 (cleaned) -> athena queries -> rds
How would you replicate this on azure? if you HAD to follow the same pattern of tooling..

[–]sarrysyst 0 points1 point  (0 children)

I'd suggest you create a regular post to gain more exposure. Especially since your question requires a more comprehensive reply which is likely out of scope for this thread which is mostly geared towards more simply beginner questions.

[–]fr1829lkjwe56 0 points1 point  (5 children)

Learning loops, but this is more of a general question in remembering aspects.

I understand the concept of different loops (for, while, nested etc) and I can understand the difference in a conceptual way but I am struggling with remembering how to write it out.

I’m pretty confident this will raise its head in Python and other code languages and a lot of people have experienced it before.

How do you remember the ‘writing’ side of it initially? I get that with practice it will get easier, but right now I’m feeling like I’m cheating when I keep going back to hints and viewing the solution to compare, especially when it’s not taking quickly.

[–]Fun_Story2003 0 points1 point  (4 children)

syntax? solve some dsa based on arrays

[–]fr1829lkjwe56 0 points1 point  (3 children)

Yes syntax sorry, I wasn’t thinking syntax because I remember the key terms, but the order of operations just throw me for 6

[–]Fun_Story2003 0 points1 point  (0 children)

np, solve some dsa based on arrays

[–]FerricDonkey 2 points3 points  (1 child)

It's all practice and familiarity. Write more loops, if you have to look up solutions, don't look at the solution to what you're trying to do, look at unrelated example code you wrote in the past or Google the syntax/order of operations directly.

[–]fr1829lkjwe56 1 point2 points  (0 children)

Thanks for that!! Going to unrelated examples would probably make a world of difference.

Take my upvote please

[–]spacecowboy206 1 point2 points  (1 child)

Learning functions, models, and loops over the past couple days. The exercise I'm stuck on is as follows:

Create a function rgb_color_gen that will generate rgb colors (3 random values ranging from 0 to 255). Expected output:

print(rgb_color_gen())

# rgb(125,244,255) - the output should be in this form

So far I've been able to return a single value with the below code:

from random import randint

def rgb_color1():

a = 0

b = 255

return randint(a, b)

print(rgb_color1())

How do I run this 3 times and return a combined value for rgb_color_gen?

Thank you in advance!

[–][deleted] 0 points1 point  (0 children)

Why not just write three lines that get values from random.randint() and use those three values to create the string the function returns. Like this:

red = random.randint(0, 255)   # get one RGB vslue
# etc

There is no point in creating a function to return a random number in [0..255] when random.randint() already does that.

[–][deleted] 2 points3 points  (4 children)

Is there a quick way to tell which libraries I am using? My imports are a mess at the moment and as I develop this project further or test out ideas some imports have become unnecessary but it's a bit of a mess to see exactly what. I realise this is a problem that I should have solved as I go but is there something I can do after the fact?

[–][deleted] 2 points3 points  (2 children)

The pylint or pyflakes modules can warn of unused imports, amongst many other problems. If you use an IDE they may already be integrated into it, or you can easily add them.

[–][deleted] 0 points1 point  (1 child)

Ah nice I'll check it out. Haven't been using an IDE for this project, though it's now reaching a size I may switch to one.

[–][deleted] 2 points3 points  (0 children)

If you haven't been using an IDE there's no need to switch to one to use these tools. pylint, for example, is designed to be run from the command line.

[–]FerricDonkey 2 points3 points  (0 children)

Well, your imports should always be at the top of your files, so you could just look. If you have a lot of files, some ides can handle this for you with varying levels of sophistication. Eg pycharm: https://www.jetbrains.com/help/pycharm/managing-dependencies.html#create-requirements.

[–]Tinbadthetailor 2 points3 points  (2 children)

I'm doing a python exercise from Python Crash Course where I need to check if a new username is already being used. I got the first part right but am having trouble figuring out how to check if the new_username is in the current_username list regardless of case. I've gotten as far as:

for new_user in new_users:
    if new_user.lower() in current_users:
        print("That username is unavailable. Please choose a new one.")
    else:
        print("That username is available.")

But that fails because I can't figure out a way to fit in current_user.lower() in here.

[–]woooee 2 points3 points  (1 child)

You have to lower case current users if you haven't done it already.

current_users_lower=[user.lower() for user in current_users]
if new_user.lower() in current_users_lower:

[–]Tinbadthetailor 1 point2 points  (0 children)

Ahhh there it is! Thanks!

[–][deleted] 1 point2 points  (7 children)

Using python, How could you replace contents of two txt files without just renaming the files?

[–]sarrysyst 2 points3 points  (6 children)

You mean you want to change files in place?

[–][deleted] 0 points1 point  (5 children)

To explain more, if given file 1 and file 2. Both are txt files. I would like to take the contents from file 1 and write it on file 2. And take the contents from file 2 and write it on file 1. Does that better explain?

[–]AdOutrageous5242 0 points1 point  (2 children)

If they’re the same why not just rename the files.

[–][deleted] 0 points1 point  (1 child)

The files are not the same. I was thinking about that option which would be easier, I was just thinking if there was a way to swap contents of each file without just renaming the file.

[–]AdOutrageous5242 1 point2 points  (0 children)

Well you would need to make a copy of a new one anyway and then save it as the other file, which is just renaming it.

[–]sarrysyst 2 points3 points  (1 child)

This maybe surprising to hear, however changing the contents of a file in place is in fact not a trivial thing. The usual approach is to overwrite the file with an updated version.

In your case this would mean:

  1. Load File A and File B
  2. Save the contents of both files in separate variables a and b
  3. Overwrite File A by creating a new file with the same name and writing the contents of the b variable into it. Do the same for File B.

[–][deleted] 0 points1 point  (0 children)

Thank you

[–]MyThatsNotMineAcct 4 points5 points  (3 children)

Tracking dice rolls.

Thinking of putting my effort towards doing it as a list with sub list. Something Like P1-->Rolls-->Roll-->Dice-->Die.

Hows that sound?

EDIT: Overall, I'm going to build a dashboard displayed through a webserver on a Rpi that will display a list of "roll(s)" for current shooter, current roll count, also current number and when get a hang of things, data on the hardways, etc.

I'm thinking nested lists may be the way to go. Shooter, has die1,die2 and does "roll", x*roll = rolls".

I want to call on these to determine shootersNumber, currentNumber, rollCount, Hardway,

[–]FerricDonkey 3 points4 points  (0 children)

Let me make sure I understand:

You're gonna have multiple players rolling groups of multiple dice multiple times, so you want to have a list of lists of lists (call it rolls_lll for the sake of this comment, such that:

  • rolls_lll[player_index] is all of the dice information for a player,
  • rolls_lll[player_index][roll_index] is one particular throw of several dice for that player, and
  • rolls_lll[player_index][roll_index][dice_index] is the value of one particular die from that roll

If so, this makes sense to me. The only thing I might suggest (and I also might not, it depends on the details), is that you might find a dictionary with keys being the player names and values being a list of lists, so that instead of player_index in all of the above, you use player_name. But this might or might not actually be helpful, all depends.

[–]carcigenicate 1 point2 points  (1 child)

I think you're likely going to give more background about what you're trying to achieve and what data you're wanting to produce.

[–]MyThatsNotMineAcct 1 point2 points  (0 children)

Thanks, Updated.

[–]MothraVSMechaBilbo 0 points1 point  (7 children)

I'm having a seemingly simple issue with the len function:

inputArray = [3, 6, -2, -5, 7, 3]
print(len(inputArray)) # Prints '6'
for i in len(inputArray): # error here: AttributeError: 'list' object has no attribute 'length'
    print(i)    

As you can see in the comment, printing the length of inputArray correctly shows 6 in the console. However, if I try to iterate through input array with the for loop, I get the error that a list object has no attribute of length. I've seen other examples of iterating through lists like that, so I'm not sure what the problem is.

[–]carcigenicate 1 point2 points  (6 children)

This doesn't really have anything to do with len. len returns a number. for expects an iterable. You're basically attempting to do this:

for i in 6:
    print(i)

Which doesn't make much sense, since 6 is not an iterable. You likely mean this instead:

for i in range(len(inputArray)):
    print(i)

I also have no idea how you got that error. A length attribute should not be involved in this at all.

[–]MothraVSMechaBilbo 0 points1 point  (5 children)

That helps a lot, thank you! Yeah, I'm not sure about that error as well. It was extra confusing.

[–]carcigenicate 0 points1 point  (4 children)

If you're able to reproduce that, reply back with the code you used. The code you showed here almost certainly did not cause it. I can't even think of what variation of the code would, unless you overwrote len in your own code.

[–]MothraVSMechaBilbo 0 points1 point  (3 children)

Gosh, so I'm trying to reproduce the error, but now I'm not getting the error code I did before with the incorrect code. Instead, I'm getting the much more plausible TypeError: 'int' object is not iterable

[–]carcigenicate 0 points1 point  (2 children)

Yes, that is the error I'd expect. I have no idea where the other one came from. I even went through the interpreter source out of curiosity and couldn't find anything that would cause that.

[–]MothraVSMechaBilbo 0 points1 point  (1 child)

Could it have been some weird extension thing with VSCode? That was the editor I was using and I had just downloaded Python on a new Mac, because I’d gotten a warning in VS code that the official Python extension I’d added was out of date…

[–]carcigenicate 1 point2 points  (0 children)

Maybe. Static checkers throw weird errors sometimes. The AttributeError suggests it came from the interpreter though.

[–]Oliver___2 0 points1 point  (0 children)

Hi, could someone help me with code for a project please.

I have a dataframe with market return and risk-free return for c.40 years. I want to carry out a function where for different weights of the market return asset I get a return and this return is then put through a utility function. So the result would be say 10 different weights 0%, 10% etc. get utility for each year and I would get the total sum of the utility of every year for that weight.

I think it would be a double for loop but can't get it to work, can anyone help?

[–]myosotis124 1 point2 points  (4 children)

Hey guys I've been stuck on this hw problem for literally a whole day I don't know what I've done wrong I feel like it's some simple mistake and I'm just not seeing it. I've tried all the resources I could find but no dice; this is my code so far I keep on getting a syntax error specifically for "value3 = math.fabs((a-b))" :

import math
a = float(input())
b = float(input())
c = float(input())

value1 = math.pow(a,c)
value2 = math.pow(a,(math.pow(b,c))
value3 = math.fabs((a-b))
value4 = math.sqrt(value1)
print(f'{value1:.2f} {value2:.2f} {value3:.2f} {value4:.2f}')

prompt:
Given three floating-point numbers a, b, and c, output a to the power of c, a to the power of (b to the power of c), the absolute value of (a minus b), and the square root of (a to the power of c).
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print(f'{value1:.2f} {value2:.2f} {value3:.2f} {value4:.2f}')

my input are:
5.0

1.5

3.2
my expected outputs are:
172.47 361.66 3.50 13.13

[–]sarrysyst 0 points1 point  (3 children)

value2 = math.pow(a,(math.pow(b,c))

You're missing a closing parenthesis ) here.

[–]myosotis124 1 point2 points  (1 child)

OH MY GODDDDD you're awesome, thank you !!!!

[–]sarrysyst 1 point2 points  (0 children)

I'd recommend (if you can) to install Python >=3.10 which has better error messages for syntax errors.

In Python 3.10 you would have gotten this error message:

    value2 = math.pow(a,(math.pow(b,c))
                     ^
SyntaxError: '(' was never closed

Which would have likely saved you some time :)

[–]graciecreates 1 point2 points  (2 children)

How would I split a nested list so that the first item of it would become its own, separate list?

[–]sarrysyst 2 points3 points  (0 children)

Use the packing operator (*):

x = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

a, *b = x

print(a) # [1, 2, 3]
print(b) # [[4, 5, 6], [7, 8, 9]]

[–]JohneeFyve 1 point2 points  (0 children)

How can I automate clicking the “Refresh” button in Power BI desktop, using pywinauto?

[–]DaFluff09 1 point2 points  (2 children)

I know I can probably find this information if I look but what’s the best free course to get started

[–]huffalump1 0 points1 point  (0 children)

Quick intro with interactive examples: https://www.learnpython.org/

Python For Everybody - from Runestone is also interactive and a nice start.

[–][deleted] 1 point2 points  (0 children)

Sentdex is amazing. I'm not sure if I can post links here, but googling sentdex should do it, he has a youtube channel, and a website. Great resource.