iterables and iterators | HackerRank | Python
ฝัง
- เผยแพร่เมื่อ 5 ก.ย. 2024
- This video is about combinations from itertools in Python.
Problem: www.hackerrank...
Sample Code:
from itertools import combinations
n=int(input())
l=list(input().split())
k=int(input())
c=list(combinations(l,k))
print(c)
r=[i for i in c if 'a' in i]
print('%.3f'%(len(r)/len(c)))
For 1 : 1 Tutoring
WhatsApp contact : 7278222619
mail: jaiswalsatya93@gmail.com
You can support via UPI : sattujaiswal@okhdfcbank
Follow us on:
Whatsapp:
chat.whatsapp....
Facebook:
/ coderscart
Linkedin:
/ satyendra-jaiswal-9035...
Instagram:
/ codingcart
#HackerRank #Python #programming
Nice explanation 👌
Glad you liked it
@coding cart
Pls make a video on itertools permutations
Sure..problem name??
0:30 thought in Python index starts at 0. Why 1?🤔😔
solution not upto mark
You can share your solution too so that others can take help 🙂.