๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • What would life be If we had no courage to attemp anything?
Problem Solving/JUNGOL

๋ฆฌ์ŠคํŠธ1

by DevIseo 2022. 1. 14.

781

li1=['Salad', 'Pizza', 'Chicken', 'Soup']
print(li1)

782

li1=['Python', 'is', 'exciting']
print(f'{li1[0]} {li1[1]} {li1[2]}')

783

li1=[1, 2, 3]
li2=[3, 6, 9]
li3=[3, 6, 9]
li4=[3, 6, 9]
li5=[2, 4, 6]

print(li1+li2+li3+li4+li5)

784

li1=[1,2]
li1.append(int(input()))
print(li1[2])
print(li1[1])
print(li1[0])

785

st1 = input()
print(st1[0])

print((list(st1))[2])

786

a = input('Element?')
b = input('Element?')
c = input('Element?')
d = input('Element?')
e = input('Element?')
f = input('Element?')

li1=[a,b,c,d,e,f]

g = int(input('Index?'))

print(li1[g:6])
a = [input('Element? ') for i in range(6)]
b = int(input('Index? '))
print(a[b:6])

787

a = [input('Element? ') for i in range(6)]
print(a[0::2]+a[1::2])

788

a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
a = list(map(int,a))

b = int(input())

num_list = []
for num in a:
    if num % b == 0:
        num_list.append(num)
print(num_list)

789

a = input().split()
print(a[::-1])

๋Œ“๊ธ€