<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0609</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-11-06</periodOfReport>

    <issuer>
        <issuerCik>0001552275</issuerCik>
        <issuerName>Sunoco LP</issuerName>
        <issuerTradingSymbol>SUN</issuerTradingSymbol>
        <issuerForeignTradingSymbol></issuerForeignTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001571871</rptOwnerCik>
            <rptOwnerName>Skidmore David K</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerNonUSAddressFlag>false</rptOwnerNonUSAddressFlag>
            <rptOwnerStreet1>4761 FRANK LUKE DR.</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>ADDISON</rptOwnerCity>
            <rptOwnerState>TX</rptOwnerState>
            <rptOwnerZipCode>75001</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>true</isDirector>
            <isOfficer>false</isOfficer>
            <isTenPercentOwner>false</isTenPercentOwner>
            <isOther>false</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Units</value>
            </securityTitle>
            <transactionDate>
                <value>2026-11-06</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>P</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>1500</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>61.5264</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>20748</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">The price reported in Column 4 is a weighted average price. These common units were purchased in multiple transactions at prices ranging from $61.11 to $61.71, inclusive. The reporting person undertakes to provide to SUN, any security holder of SUN, or the Staff of the Securities and Exchange Commission, upon request, full information regarding the number of units purchased at each separate price within this range.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Peggy J. Harrison, Attorney-in-Fact for Mr. Skidmore</signatureName>
        <signatureDate>2026-11-10</signatureDate>
    </ownerSignature>
</ownershipDocument>
