I'm having issues submitting to Leetcode which are getting frustrating. A couple of times now I have written a solution to a challenge, tested it and its worked then upon uploading and submitting to Leetcode I get syntax errors. I'm trying to run this code (which returns fine in VSC). def removeDuplicates(nums): store_list = [] store_blank = [] for item in nums: if item not in store_list: store_list.append(item) else: store_blank.append("_") total = len(store_list) for x in store_blank: store_list.append(x) return (f"{total} , nums = {store_list}") For this challenge : https://leetcode.com/problems/remove-duplicates-from-sorted-array/submissions/1640977572/ And get this error: SyntaxError: invalid syntax ^ return (f"{total} , nums = {store_list}") Line 17 (Solution.py) The only thing I can find online is that the return statement is not formatted properly, but it has to be as it works when I run it... I recognize I haven't set up a class like in the challenge, I normally just copy paste everything below the "def function line" straight in and most of the time it works. If anyone can shed light that'd be amazing. Thanks Re formatted the return statement a bunch of times, removed spaces, tried different quotations ("") & ('') tried with and without parenthesis... Always receive the same error no matter how I format it, even though it always works in VSC Continue reading...