...code checks if a file exists in the current directory:
```python
filename = "myfile.txt"
if filename.startswith(".") or filename.startswith("/"):
print("File cannot be created")
else:
open(filename, "w")
```
### Hashtags
* #Python
* #startswith
* #String
* #Validation
* #file-handling