is there any shorthand method of defining multiple objects of the same class in one line. (I’m not talking about lists or array of objects)..
i mean something like
p1,p2,p3 = Point()
any suggestions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Think map is also acceptable here:
But generator expression seems to be a bit faster: