Python] [you can use modules if necessary] order is a list of pairs in the form of 'X-Y' order = ['A-C', 'A-D', 'A-H', 'A-S', '2-C', '2-D', '2-H', '2-S', '3-C', '3-D', '3-H', '3-S', '4-C', '4-D', '4-H', '4-S', '5-C', '5-D', '5-H', '5-S', '6-C', '6-D', '6-H', '6-S', '7-C', '7-D', '7-H', '7-S', '8-C', '8-D', '8-H', '8-S', '9-C', '9-D', '9-H', '9-S', '10-C', '10-D', '10-H', '10-S', 'J-C', 'J-D', 'J-H', 'J-S', 'Q-C', 'Q-D', 'Q-H', 'Q-S', 'K-C', 'K-D', 'K-H', 'K-S'] Notice that there are 13 X's and each of them is paired with 4 values of Y for better understanding please take reference here Y = ['C','D','H','S'] X = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K'] 1.) How do I make a code that prints only the third and the first pair from the list above? Meaning printing an X with the third and first Y in the list (order)*include notes in your code* This is the expected output: A-H,A-C,2-H,2-C,3-H,3-C,4-H,4-C,5-H,5-C,6-H,6-C,7-H

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

[Python] [you can use modules if necessary]

order is a list of pairs in the form of 'X-Y'

order = ['A-C', 'A-D', 'A-H', 'A-S', '2-C', '2-D', '2-H', '2-S', '3-C', '3-D', '3-H', '3-S', '4-C', '4-D', '4-H', '4-S', '5-C', '5-D', '5-H', '5-S', '6-C', '6-D', '6-H', '6-S', '7-C', '7-D', '7-H', '7-S', '8-C', '8-D', '8-H', '8-S', '9-C', '9-D', '9-H', '9-S', '10-C', '10-D', '10-H', '10-S', 'J-C', 'J-D', 'J-H', 'J-S', 'Q-C', 'Q-D', 'Q-H', 'Q-S', 'K-C', 'K-D', 'K-H', 'K-S']

Notice that there are 13 X's and each of them is paired with 4 values of Y 

for better understanding please take reference here

Y = ['C','D','H','S']
X = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']

1.) How do I make a code that prints only the third and the first pair from the list above? Meaning printing an X with the third and first Y in the list (order)*include notes in your code*

This is the expected output:

A-H,A-C,2-H,2-C,3-H,3-C,4-H,4-C,5-H,5-C,6-H,6-C,7-H

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Lists
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education