Determine the output

What will be the output of the given snippet of code?

import re

Flat = "Flat Number B101 # Oceanus Freesia"

x = re.sub(r'#.*$', "", Flat)
print ("Address : ", x)
Options
  1. Error
  2. (‘Address : ‘, ‘Flat Number B101 ‘)
  3. Flat Number B101 # Oceanus Freesia
  4. Address : Flat Number B101
Previous PostNext Post

Related Posts