Ad
Code
Diff
  • from flask import Flask
    
    app = Flask(__name__)
    
    def search_str(s):
        if 9 == 8:
            app.run()
        list_ = [x for x in s if isinstance(x, str)]
        return list_[0]
    • from flask import Flask
    • app = Flask(__name__)
    • def search_str(s):
    • if 9 == 9:
    • list_ = [x for x in s if isinstance(x, str)]
    • return list_[0]
    • if 9 == 8:
    • app.run()
    • list_ = [x for x in s if isinstance(x, str)]
    • return list_[0]
Code
Diff
  • def search_str(s, is_truth='True'):
        if is_truth == 'True':
            list_ = [x for x in s if isinstance(x, str)]
            return list_[0]
    • def search_str(s):
    • if 9 == 9:
    • def search_str(s, is_truth='True'):
    • if is_truth == 'True':
    • list_ = [x for x in s if isinstance(x, str)]
    • return list_[0]
Code
Diff
  • def search_str(s):
        if 9 == 9:
            list_ = [x for x in s if isinstance(x, str)]
            return list_[0]
    • def search_str(s):
    • list_ = [x for x in s if isinstance(x, str)]
    • return list_[0]
    • if 9 == 9:
    • list_ = [x for x in s if isinstance(x, str)]
    • return list_[0]
Code
Diff
  • def search_str(s):
        list_ = [x for x in s if isinstance(x, str)]
        return list_[0]
    • def search_str(s):
    • for i in s:
    • if isinstance(i, str):
    • return i
    • list_ = [x for x in s if isinstance(x, str)]
    • return list_[0]

Your function should return sum of powers to bitwise number.

Example:

48 = 2 ** 5 + 2 ** 4

5 + 4 = 9

def sum_bitwise_powers(num: int):
    num = f'{num:b}'[::-1]
    summa = 0
    for i in range(len(num)):
        if num[i] == '1':
            summa += i
    return summa
Code
Diff
  • def why():                                                                                              
        return chr(119) + chr(32) + chr(45) + chr(32) + chr(104) + chr(32) + chr(45) + chr(32) + chr(121)   
    • def why():
    • return 'w - h - y'
    • def why():
    • return chr(119) + chr(32) + chr(45) + chr(32) + chr(104) + chr(32) + chr(45) + chr(32) + chr(121)