Sorry if the question is off, but this is some simple code.
quiz_description = 'A quiz to test your knowledge'
quiz_type = 'This quiz is about social studies'
quiz_length = 'This test is five minutes long'
while 0 == 0:
user_input = input('What do you want to know about the quiz? (length|type|description)\n')
print('quiz_' + user_input)
This code will result in
quiz_lenght
But I want to join quiz_
and user_input
, which is length
, and result in quiz_lenght
and display what is set for that string, which is 'This test is five minutes long'
.
Is there any way of achieving this?