what is the output of the following code?
M=['b' *x for x in range(4)] print(M)
निम्नलिखित कोड का आउटपुट क्या है?
A. ['', 'b', 'bb', 'bbb']
B. ['b,'bb', "bbb', "bbbb']
C. ['b','bb', bbb']
D. none of these इनमे से कोई नहीं
range(4) gives: [0, 1, 2, 3]
'b' * x repeats the character 'b' x times
So:
'b' * 0 → ''
'b' * 1 → 'b'
'b' * 2 → 'bb'
'b' * 3 → 'bbb'