Skip to main content

Python 2, 55 bytes

def f(n):m='a','b';exec'print m[-2];m+=m[-2]+m[-1],;'*n
def f(n):m='a','b';exec'print m[-2];m+=m[-2]+m[-1],;'*n

Python, 55 bytes

def f(n):m='a','b';exec'print m[-2];m+=m[-2]+m[-1],;'*n

Python 2, 55 bytes

def f(n):m='a','b';exec'print m[-2];m+=m[-2]+m[-1],;'*n
Source Link
miles
  • 17k
  • 2
  • 30
  • 94

Python, 55 bytes

def f(n):m='a','b';exec'print m[-2];m+=m[-2]+m[-1],;'*n