I'm trying to use an input as an argument. dsd is supposed to be the argument of permutations(e.g 2). keywords.txt is a text file with 4 words each separated by \n. But whenever i run this, there's this error:
for b in perm(k2, dsd):TypeError: Expected int as r**
from itertools import permutations
perm = permutations
k = open('keywords.txt', 'r')
k1 = k.readlines()
dsd = input("")
if dsd == 'exact':
dsd == len(k1)
print(len(k1))
k2 = [d.strip('\n') for d in k1]
for b in perm(k2, dsd):
print(''.join(b))
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I was wondering, is it a good practice, to have different Celery instance objects using same broker?
This question already has an answer here:
Hey guys I have a question regarding passing a variableI'm basically interested in counting all the vowels in a certain string