TORONTO KIDS COMPUTER CLUB | Aurora Tuesday 18:30 Python Practice – 16 20.12.01.
18796
post-template-default,single,single-post,postid-18796,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Aurora Tuesday 18:30 Python Practice – 16 20.12.01.

05 Dec Aurora Tuesday 18:30 Python Practice – 16 20.12.01.

Question:
Write a Python program to create a list by concatenating (joining) a given list [‘p’, ‘q’] which range goes from 1 to n.

Sample Input: 
n: 5
Sample Output:
['p1', 'q1', 'p2', 'q2', 'p3', 'q3', 'p4', 'q4', 'p5', 'q5']
No Comments

Sorry, the comment form is closed at this time.