One line Python3 O(n)
Intuition\n Describe your first thoughts on how to solve this problem. \nThe problem is to generate a list of strings from 1 to n, and for multiples of 3, the s
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nThe problem is to generate a list of strings from 1 to n, and for multiples of 3, the string should be "Fizz", for multiples of 5, the string should be "Buzz" and for multiples of 3 and 5, the string should be "FizzBuzz".\n# Approach\n<!-- Describe your approach to solving the problem. -->\nThe approach is to iterate through the range of 1 to n, check if the current number is divisible by 3 and 5, and based on that, create the corresponding string.\n\n\n# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def fizzBuzz(self, n: int) -> List[str]:\n        return [str(i) if i%3 and i%5 else \'Fizz\'*(i%3==0)+\'Buzz\'*(i%5==0) for i in range(1,n+1)]\n\n```
['Python3']