What does this mean: AttributeError: 'str' object has no attribute 'write'
<p>When I go to run this code, I get the error above. I would understand if it was because one of my objects haven't been identified as strings but the error appears on the first <code>file_name.write()</code></p>

<pre><code>def save_itinerary(destination, length_of_stay, cost):
    # Itinerary File Name
    file_name = "itinerary.txt"

    # Create a new file
    itinerary_file = open('file_name', "a")

    # Write trip information
    file_name.write("Trip Itinerary")
    file_name.write("--------------")
    file_name.write("Destination: " + destination)
    file_name.write("Length of stay: " + length_of_stay)
    file_name.write("Cost: $" + format(cost, ",.2f"))

    # Close the file
    file_name.close()
</code></pre>