Jump to content

Want help with coding!


Recommended Posts

so! I was creating a class with python

class car{

now creating an object

car mycar = new car();

is it possible to use a variable instead of mycar? (like for user input)

the same way. can we use a variable instead of object name mycar.someMethod ?

I want to.

creating multiple objects.

ask the user if he wants to use an object

ask the user for the name of object

run the method with the choosen objects



please tell me how is it possible?


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...