Python Variables

To all Python Programmers, I need some help.
So, I have been practicing with Python, and variables are a fucking bliss. (I know some basic C++).
I got to make a program where you store people's selection of movies and other kind of info like age, name, etc. The thing is that I have to do it in Python, but I can't find a way to input values to a variable through the console like in C++.
For example, in C++
You do:
/ char name;
cout name;
/
and as easy as that you can input a variable.
But in Python I can't find a way to do the same thing 'cause variables have to be given a value from the getgo.
Please, HELP!

Attached: pythonfeatured.jpg (1395x864, 86K)

Other urls found in this thread:

youtube.com/watch?v=fu3gukA12CQ
twitter.com/SFWRedditImages

name = input('Whats your name?')

Why can't you just fucking use Google?

I tried that mate, throws me an error when I try to use a switch cause there's no such thing as a switch case.
Jow Forums is the last I place I would go to ask for things like these 'cause of fags like you, so, i'm implying I have tried google before, dumbass.

>ITT: how not to ask technical questions 101

imagine being this retarded at using a search engine

Give up now.

I have

What the fuck? Using a switch case has nothing to do with accepting input from the user

I know, but, ok.
Sorry, im bad at explaining things, the thing is that I want to save variables to use them later as options in a switch, but there's no thing as a switch case in Python, at least that's what I've heard.

what does it have to with reading user's input? why do you mix it? are you 13 and retarded?

yes im 13 and yes im retarded.
Look, the programs asks for your favorite movie genre, your age, what kind of actors you like, your name, etc.
It saves these answers as variables and then prints the info when asked what kind of info you want.
That's why I need a kind of switch that works with variables that you can input.

I have the answer for you. I know the secret way to assign user input to a variable that enables switch case in Python. But you'll have to pay me $100, I accept paypal and bitcoin. Give me your email and we can work this out.

Is this a brainlet thread?

Attached: p.jpg (797x146, 29K)

>store SOMETHING
Use 1C russian botnet (pirated)
youtube.com/watch?v=fu3gukA12CQ

Attached: 1c.jpg (1240x580, 41K)

I started Python a few days ago.What the fuck are you even on about?

Attached: Screenshot from 2019-02-22 17-24-52.png (1920x1080, 97K)

This. Just use if-elses instead of a switch

>>> class Movie:
... def __init__(self, name, year):
... self.name = name
... self.year = year
>>> m = Movie("OP is faggot", 2019)
>>> getattr(m, "year")
2019
>>> def lookup_attr(obj, attr):
... if hasattr(obj, attr):
... return getattr(obj, attr)
... return None

variable = sys.stdin.readline() >>>>>>>> input()

Attached: 1549776044088.gif (200x200, 105K)

>but there's no thing as a switch case in Python, at least that's what I've heard.

Attached: AHAHAHAHAH FAGGOT.jpg (162x215, 11K)

Maybe you are using python2? Try variable = raw_input('lol w00t?')

What the fuck

Well, there is no "case", but you could make a dictionary, and use functions as a key values:

case = {1: function1(),
2: function2(),
3: function3()}

but.. why

to confuse people which will look at your scripts, after you're gone.

Just use if ...elif...elif. Why are you baffled by the fact your switch-case doesn't work when it's not in the language? retard

>It's another "brainlet learns to code" episode

Good god man

u know ive been programming python a decade now - never have seen/used 'input'

this thread was bait, I couldn't delete it so I left for some hours and look, it got some attention, lol.

Use a dictionary dumbass