This video is about combinations from itertools in Python.
Problem: https://www.hackerrank.com/challenges...
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:
https://chat.whatsapp.com/LNwHGukUizj...
Facebook:
/ coderscart
Linkedin:
/ satyendra-jaiswal-903588a2
Instagram:
/ codingcart
#HackerRank #Python #programming
On this page of the site you can watch the video online iterables and iterators | HackerRank | Python with a duration of hours minute second in good quality, which was uploaded by the user Coding Cart 18 April 2020, share the link with friends and acquaintances, this video has already been watched 3,604 times on youtube and it was liked by 56 viewers. Enjoy your viewing!