Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- """
- Created on Sat Nov 21 20:31:21 2020
- @author: Sergey
- """
- a=input()
- data=[a[0], a[1], a[2], a[3]]
- ans=[]
- for i in range(4):
- data1=data.copy()
- s1=data[i]
- data1.pop(i)
- for j in range(3):
- data2=data1.copy()
- s2=data1[j]
- data2.pop(j)
- for k in range(2):
- data3=data2.copy()
- s3=data2[k]
- data3.pop(k)
- s4=data3.pop(0)
- ans.append(s1+s2+s3+s4)
- ans1=list(set(ans))
- print(len(ans1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement