Python Day 26 – variables and operators

Continued my journey on this intro Udemy course. The videos I watched today mostly helped cement some contextual understanding of how Python works…

I learned:

A variable is created whenever you set “some text” = “anything else, like an int or str or float”. Also apparently in Python it’s a little bit more useful to think of variables as being bound to their value, and not the value being bound to the variable. I don’t know the specific contexts in which this will make things easier to understand, but it makes sense to me right now.

Also the operator // is different than / because it returns an integer rather than a float, which can be useful in functions in which you need an integer.

To ignore an escape character (\) if you want it to actually show in a string, put two of them!

That was it for today. No new questions arose as I was going over some pretty basic stuff that I mostly already knew.

Happy day to everyone 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: