{
}
Online Python Compiler
Online R Compiler
Online SQL Editor
Online HTML/CSS Editor
Online Java Compiler
Online C Compiler
Online C++ Compiler
Online C# Compiler
Online JavaScript Compiler
Online GoLang Compiler
Online PHP Compiler
Online Swift Compiler
Online Rust Compiler
Generating Link
Generating Link
Share your code
Share code
Copy Link
Copied to clipboard
or share using
Python Online Compiler
Learn Python App
Learn Python
main.py
Output
main.py
Share
Run
Run
#!/bin/env python3 loveParts = ["Loves me", "Loves me not"] def loves_me(n): loveString = "" for i in range(n-1): loveString += f"{loveParts[i%2]}, " loveString += loveParts[(n-1)%2].upper() return loveString
Output
Clear